Ιούνιος 2009 - Δημοσιεύσεις

CodeSmith templates for Xaf
30 Ιουνίου 09 11:39 πμ | tolisss | 0 σχόλια   
Yes I know that is not the best practice. When using Xaf or Xpo you should first design your objects and let the framework create the database schema based on objects metadata (attributes). But there are many cases that the database is already design and you can not change it. What about those projects? Are you going to say to your customer that you do not want that project? Are you going to sit down and write all classes by hand? The best solution on this is to use some Template engine like Codesmith to create the initial implementation for you and then you can change them to meet your needs. You can also find a freeware version of Codesmith here Devexpress also has a persistent class generation Util which ca be invoked from the add new item form    

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,
TypeMock MVP
29 Ιουνίου 09 03:02 μμ | tolisss | 0 σχόλια   
Since I am the first user of TypeMock !!!, Gil Zilberfeld which is a technology Evangelist at TypeMock offer me a TypeMock MVP title. Also that title gaves me access to see all future TypeMock exciting stuff before go official. Do not know if I can blog about them though. Thank you Gil and TypeMock it is my honor to use such a great tool!!!

Διαβάστε περισσότερα »

eXpand Step 1 – refactoring and renaming
26 Ιουνίου 09 12:57 πμ | tolisss | 0 σχόλια   
Related posts: eXpand RWF = (Real world framework)--->First thoughts Refactoring namespaces I am going to start refactoring today and I am going to use Resharper and its rename NameSpace feature to accompish it. I though it will be easy, but nothing is easy at this life. What happen ? At my pc Core 2 Quad with 8G memory I tried to refactor directly the word XAFPoint which is the root namespace in all assemplies. Yes you can do that!!! if you have for example a namespace like: RootNameSpace.SubNameSpace1.SubSubNameSpace at assembly 1 RootNameSpace.SubNameSpace2.SubSubNameSpace at assembly 2 and you try to rename using ReSharper the RootNamepace to RenamedNameSpace you will end up with: RenamedNameSpace.SubNameSpace1.SubSubNameSpace at assembly 1 RenamedNameSpace.SubNameSpace2.SubSubNameSpace

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
TDD, Xaf, Typemock and eXpand
25 Ιουνίου 09 02:26 πμ | tolisss | 0 σχόλια   
If you do not know about TypeMock see some cool video tutorials here . TDD is an software design approach that states: In order to design your software from the correct angle and don’t get lost in the info you have first write down a test that describes a behavior and then by using tools like ReSharper to actually create the “at most as code is required to make that test past” There is an excellent video from Gary and Oliver on how to TDD with Xaf . These guys know a lot but you have to analyze each word they say to get the real power out of it. Nice work guys!! and we love to see more videos like that but going deeper onto the “software design” stuff. Test Driven Development Techniques Now that I am sure that you know what is TDD is I am going to saw you the

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , , , ,
AspxTreeList editor for Xaf
23 Ιουνίου 09 12:59 μμ | tolisss | 0 σχόλια   
Thnks to my friend Aristeidis I have in my hands a WebPropertyEditors that contains an AspxTreeList implementation and I can share it with the community. Since I didn’t write the code I cannot answer to many questions but from a first look I an IWebTreeNode interface that should be implemented by your persistent object along with ITreeNode.   thnk you for sharing this one Aris Download

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
eXpand RWF = (Real world framework)--->First thoughts
22 Ιουνίου 09 11:55 μμ | tolisss | 0 σχόλια   
The last few months me and my friend John have been working on a framework build using X af . It is called XafPoint and has almost 40 generic modules!!! What is it? What it does ? It is build using the same architecture as Xaf and contains abstract modules like the Xaf one’s so we can build our every day scenario. How it was build ? Since I am  from the first beta day a Xaf user I managed to have a strong and abstract layer just above xaf. Then I met john that had a large project and he was using SharePoint services to implement it. But when I told him some cool stuff on Xaf he got very excited and he told me that he wanted to use Xaf as the data management feature of SharePoint so we tried and in a few months join our knowledge and tools and we build a

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , ,
one more secret reveal !!!!
21 Ιουνίου 09 12:55 πμ | tolisss | 0 σχόλια   
  if you do not know about ITreenode’s purpose read this The problem I just came back from my friend Aristeidis home . Aris told me that he want me to have a look a his brand new AspxTreelistEditor and have also some cold beers we can drink . After some beers Aris ask was telling me how he solved the circularReferences between parent child relation. Because ITreenode implementation is too simple or you are lazy to search for the best practice you possibly implement like Aris and I do it up to today. But today is different cause while exploring Devexpress sources I found DevExpress.Persistent.BaseImpl.HCategory that solves that problem one more secret reveal !!!!

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία:
Coderush plugins for Xaf update2
19 Ιουνίου 09 01:14 πμ | tolisss | 0 σχόλια   
Steven Rasmussen found a bug at modeleditor plugin that was: if you have any of your modules saved at a directory that contain spaces in its name the modeleditor failed to open the fixed version can be found here

Διαβάστε περισσότερα »

Coderush plugins for Xaf update1
17 Ιουνίου 09 10:59 μμ | tolisss | 0 σχόλια   
Xaf addins won’t load if there was a special kind of project in your solution like Setup Project,DataBaseProject I have fix that and you can download them again here

Διαβάστε περισσότερα »

Xpo Properties for Strongly Typed freaks!!!
16 Ιουνίου 09 05:03 μμ | tolisss | 0 σχόλια   
Because XPbaseObject implements INotifyPropertyChanged property setters need to be implemented using a special way like public   string Name {     get     {         return name;     }     set     {         SetPropertyValue( "Name" , ref name, value);     } } but if you are a strongly typed fun like me the you certainly will not like the string representation of the “Name” as a parameter of SetPropertyValue because if you rename the property then you should explicitly rename the string parameter as well. I used to write my properties like private   string nameWithReflection; public  

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
More Static Reflection
15 Ιουνίου 09 10:57 μμ | tolisss | 0 σχόλια   
Today we are going to speak about an implementation of the approach describe in this post . INotifyPropertyChanged is responsible for notifying clients that a property value has changed.To implement INotifyPropertyChanged you should write a code similar to public class Client : INotifyPropertyChanged { private string name; public string Name { get { return name; } set { if (name == value) return; name = value; OnPropertyChanged(new PropertyChangedEventArgs("Name")); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) { if (PropertyChanged != null) PropertyChanged(this, e); } } and the test of the behaviour that we want would

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: ,
Static Reflection
15 Ιουνίου 09 05:27 πμ | tolisss | 0 σχόλια   
We all get into situation where we need to access class metadata like properties,methods and fields and we use reflection to accomplish it private class Customer { public string LastName { get; set; } } [Test] public void Test() { Assert.IsNotNull(typeof(Customer).GetProperty("LastName")); } but what will happen if we change the property name of “LastName” to “SurnName” ?? Our test will fail . But there is a rescue on this one using linq expression trees. public static class ReflectionExtensions { public static MethodInfo GetMethod<TTarget>(this TTarget target, Expression<Action<TTarget>> method) { return GetMethodInfo(method); } private static MethodInfo GetMethodInfo(Expression method) { if (method == null) throw new ArgumentNullException("method");

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: ,
DevExpress Rocks!!
11 Ιουνίου 09 05:13 μμ | tolisss | 0 σχόλια   
These people are actually monitoring everything. Its been only one week of blogging and my efforts payed already see DevExpress official blog on this post How to master a language in less than 10,000 hours

Διαβάστε περισσότερα »

Xaf Exception Stack Explorer
10 Ιουνίου 09 09:07 μμ | tolisss | 0 σχόλια   
Xaf has its own tracking system enabled by default . What it does? It tracks almost every from exception to button clicks and object states!! What I want to saw you is how easy we can create a CodeRush addin that every time an exception occurs we could navigate through all the stack trace We will accomplish that using Resharper’s stackTraceExplorer . So all we need to do is to find startup project’s bin directory open expressAppFramework.log which is the file that Xaf writes all traces, find the last entry, copy it to memory and send to Visual studio a Resharper+ExploreStackTrace command Lets do it. In fact we can easily extend the plugins project I posted here and have all in one package. But we have to be careful when trying to read a log file cause it may

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,
CodeRush plugins for Xaf
04 Ιουνίου 09 08:42 μμ | tolisss | 0 σχόλια   
Download sources (10/6/09) (see Xaf Exception Stack Explorer ) ProjectConverter Browsing and downloading from Devexpress support center often I find old projects with broken references Old days when i see broken references at my solution due to version changes I had to go to my C:\Program files\pathToYourProjectConverter executable. Open it, browse to find my solution folder and convert it Nowadays I am using a small CodeRush addin I wrote and I can convert any solution from with in Visual Studio By pressing a shortcut. You have to configure it by setting its path as shown in the image bellow if you use a recompile version of the assemblies you can also set at the PublicToken field Then you go to shortcuts and assign a shortcut key for the convertProject command

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,
Multiple inheritance for .Net is here!!!
03 Ιουνίου 09 05:46 μμ | tolisss | 0 σχόλια   
I though i should post on this one cause its far more than interesting suppose you have a Customer that is a Person public class Person { public string Name { get; set; } } public class Customer : Person { } and implements 2 interfaces ICustomUser,ICustomer public interface ICustomUser { string Title { get; set; } } public interface ICustomer { string Title { get; set; } } one could write public class Customer : Person,ICustomUser,ICustomer { string ICustomUser.Title { get; set; } string ICustomer.Title { get; set; } } But in order to access the values of the properties Customer should be extended to something like public class Customer : Person,ICustomUser,ICustomer { private string customUserTitle; public string CustomUserTitle { get { return customUserTitle;

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , ,
Validation Rule: At least one property is required
03 Ιουνίου 09 01:33 πμ | tolisss | 0 σχόλια   
Today i stump again upon the same problem . I wanted to throw a validation exception only if both of my properties do not have value. So lets create a validation rule for this one. More info on how we create custom validation rules can be found here Validation Module Since we are talking about multiple property values i think we should go with an attribute that is applied to a class and not to a property. Ok first we have to define that both our RuleBaseAttribute and RuleBaseProperties derived classes will implement . public interface IRuleRequiredForAtLeast1PropertyProperties { string MessageTemplateMustNotBeEmpty { get; set; } string Delimiters { get; set; } string TargetProperties { get; set; } } ok that looks nice lets explain what we have here for a bit.

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , ,
Automatic properties for Xpo
02 Ιουνίου 09 05:23 πμ | tolisss | 0 σχόλια   
  The problem Xpo in order to support transactions implements some special kind of property setters like private string lastName; public string LastName { get { return lastName; } set { string oldValue = lastName; if (oldValue == value) return; lastName = value; OnChanged("Name", oldValue, value); } } Or a little more elegant like private string lastName; public string LastName { get { return lastName; } set { SetPropertyValue("LastName", ref lastName, value); } } Imagine you want to Design a fairly simple model like Customer –> Orders. A Customer should have LastName, FilrstName, Age and Orders as properties and Order only an Amount property. Using the above approach one could write the following code to describe the above model.

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,
The second blogging day, Which tools can i use for blogging?
02 Ιουνίου 09 05:05 πμ | tolisss | 0 σχόλια   
  The first blogging day was easy not much to say . I am a big newbie on this one. So lets start our blogging adventure. I will see it like a problem that i am going to solve and even move it on step more (hahaha classic eh?) Requirements for blogging I would like to have an offline tool like word to write my posts so i can format the text easily and faster than any Web Base Html Editor I would like to be open source or have a big community that supports it writing addons I want to upload any file along with images and videos Easy screenshot attachment At least C# code formatting abilities Lets start googling on those requirements then . First i fell upon Zountry but it didn’t convince me, i wanted something better than this one. Second attempt and voila

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
Xaf adventures
02 Ιουνίου 09 01:10 πμ | tolisss | 0 σχόλια   
Before many years when i trying to find my way in R&D world using Delphi 6 if I remember well i met DevExpress . Since then and after .Net appears i have been following those guys. Their organization if you do not already know is unbelievable their controls suite the same. But before 2 years they started a new project called Xaf . Xaf is an application framework that if i can describe it in 7 words is "it makes you speak the business language". I hope that you already know the basics on Xaf so i will try to blog on that wonderful framework and give you some code, ideas on that

Διαβάστε περισσότερα »

Contact me
01 Ιουνίου 09 04:19 πμ | tolisss | 0 σχόλια   
id = 23518;

Διαβάστε περισσότερα »

Search

Go

Το Ιστολόγιο

Ιστορικό Δημοσιεύσεων

Συνδρομές