Favor composition over inheritance
09 Αυγούστου 09 05:15 μμ | tolisss | 0 σχόλια   
There is a software design principle that states “ Favor composition over inheritance ” Inheritance is a cool way to change behavior. But we know that it's brittle, because the subclass can easily make assumptions about the context in which a method it overrides is getting called. There's a tight coupling between the base class and the subclass, because of the implicit context in which the subclass code I plug in will be called. Composition has a nicer property. The coupling is reduced by just having some smaller things you plug into something bigger, and the bigger object just calls the smaller object back. From an API point of view defining that a method can be overridden is a stronger commitment than defining that a method can be called. That Principe my friends

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

Δημοσίευση στην κατηγορία: , , ,
Xaf tip #2
02 Αυγούστου 09 11:09 πμ | tolisss | 0 σχόλια   
Just come back from my short holidays this year and I am feeling very relaxed. So I though I should continue my Xaf tips series as I encounter them in my every day work. Be carefull of DevExpress.ExpressApp.DC.TypesInfo.FindTypeInfo method I am only going to say that each time you call the above method if the typeInfo that you expect to get back is not redistered on the system, a new one is going to be created and returned to you. so typesInfo.FindTypeInfo(typeof(Person))!=typesInfo.PersistentTypes.Where(info => info.Type==typeof(Person)).SingleOrDefault() and for you to imagine any kind of conflict you like take into account that a new table named Person is going to be created at your db with the following line if (typesInfo.FindTypeInfo(typeof(Person))!=null)

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

Δημοσίευση στην κατηγορία: , ,
eXpand 0.0.0.8 is out
24 Ιουλίου 09 02:12 μμ | tolisss | 0 σχόλια   
I am releasing a new version of expand this time using continuous integration provided by TeamCilty DictionaryDifferenceStore has now be able to work at all Security Scenarios (Complex or simple). There is one catch though if you want to use your own custom User or Role objects and you cannot modify any of the nested Role/User List view of the DictionaryDifference Views get latest version of expand here http://code.google.com/p/expandframework/

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

Δημοσίευση στην κατηγορία: , , ,
Continuous integration for eXpand
24 Ιουλίου 09 02:08 μμ | tolisss | 0 σχόλια   
First of all thank you very much for your good words in eXpand . I am going to continue releasing modules and the next one will be a big one so please bear with me. But since I am relasing a lot of code and some other developers contact me that they want to contribute also. I think its time to to move on to apply a more continous integration to our build proccess. What I mean by that? the paragraph bellow was takes from martinfowler.com The easiest way for me to explain what CI is and how it works is to show a quick example of how it works with the development of a small feature. Let's assume I have to do something to a piece of software, it doesn't really matter what the task is, for the moment I'll assume it's small and can be done in a few hours. (We'll explore

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

Δημοσίευση στην κατηγορία: , , , ,
How to download eXpand source code from google subversion
21 Ιουλίου 09 05:38 πμ | tolisss | 0 σχόλια   
After some requests I am going to give any info required to get eXpand’s source code from Google code. First you are going to need a Subversion Client. I am using the free  TortoiseSVN client on both 32 and 64bit environments without any problems. In fact it is very easy to use . After you install it just right click inside any directory in your windows explorer and you are going to see some more entries on the popup menu for getting a read-only copy of expand click on the SVN Checkout menu entry and paste http ://expandframework.googlecode.com/svn/trunk/ on the popup window and you are going to have all the source code to your disk. Contributing your code. For those that never use an svn client before I suggest to download and use up to trial end (or you

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

Δημοσίευση στην κατηγορία: ,
Configurable low level datastore filtering provider module for Xaf
20 Ιουλίου 09 12:30 πμ | tolisss | 0 σχόλια   
This one is hard to explain so I would start with one scenario that can be implemented with ease. You have a request to create a windows form application that the data should be filtered according to the active skin, also the request says that Customers should be shared through skins. Another request for the same project is application data to be filtered according to the active user but customers to be shared across all users For such scenarios that are: Filter data at a low level so any logic above this level to still function (see validation rules) I have develop FilterDataStore module and I am going to release it as part of eXpand 0.0.0.7 To configure the module one have to add a filter provider at its application configuration file (see A practical guide

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

Δημοσίευση στην κατηγορία: , ,
DxCore plugins for Xaf are moving
19 Ιουλίου 09 11:36 μμ | tolisss | 0 σχόλια   
I am realizing a new version of eXpand (0.0.0.7) that will contain a configurable low level datastore filtering provider module and I am going to merge Coderush plugins into it as well. You have to download latest version of eXpand from http://code.google.com/p/expandframework/downloads/list and add only the following assemblies into your community folder if you are not interested in eXpand  DevExpress.ExpressApp.ModelEditor.v9.1 eXpand.Utils Wintellect.Threading eXpandAddIns

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

Δημοσίευση στην κατηγορία: , , , , ,
Runtime distribution of model changes to a group of users
14 Ιουλίου 09 12:15 πμ | tolisss | 0 σχόλια   
I am going to demonstrate one more application scenario using eXpand and DictionaryDifferenceStore module. We are going to create to roles (hrempolyers , courierempoyers) and we are going to assign a difference Cutomer listview to each one of them Listview for HR people will see customers grouped by their birthday and listview for courier grouped by their address For both roles the navigation menu will contain the default User button that was provided by xaf . see how to setup DictionaryDifferenceStore module In the next video I have already created 2 extra Roles HRRole with Hr1, Hr2 Users CourRole with Cour1, Cour1 Users inside The above video was recorded with eXpand v0.0.0.6 http://code.google.com/p/expandframework/downloads/list Technorati Tags: eXpand ,

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

Δημοσίευση στην κατηγορία: , , ,
Generate runtime members -- eXpand
10 Ιουλίου 09 02:12 μμ | tolisss | 0 σχόλια   
  Today I am going to saw you how easy is the Generation of runtime members. eXpand provides a controller that extends model schema and allow runtime generation of members without writing even 1 line of code ( Xaf power to the people!!!) For doing this You have to use a combination of features from eXpand.DictionaryDifference.dll && eXpand.ExpessApp.Win.dll This generation is doable due to the fact that we have use use DictionaryDifference module to store the model in the database, and since there is a clear distinguish between user model and application model, we can have use dictionarydifference UI to set the Model editor attribute that does that expansion, which is the IsRuntimeMember attribute defined at eXpand.ExpressApp.SystemModule.AddRuntimeFieldsFromModelToXPDictionary

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

Δημοσίευση στην κατηγορία: , , , ,
Real World FrameWork (eXpand)– First release
08 Ιουλίου 09 04:01 πμ | tolisss | 0 σχόλια   
Refactoring was too time consuming cause I had to work with all modules together and they are almost 40 of them. Because I want to focus only at the modules that we are going to release at first alpha version I am going to talk only about those. eXpand as I already said has almost the same architecture as Xaf .The number of project we are going to released are 11. eXpand.Utils That project is holding reusable classes that can be used through other modules. Also dynamic Linq library is hosted here eXpand. Xpo CustomCollections, ConnectionProviders, ValueConverter, FunctionOperators, CustomXPObjects, TypeConverters, Attributes that are specific to Xpo are hosted here. eXpand.BaseImpl Is the same as ExpressApp.BaseImpl and is holding base implementations of Persistent

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

Δημοσίευση στην κατηγορία: , , , , ,
Inspect Xaf code quality and override version migration problems using NDepend
04 Ιουλίου 09 08:36 μμ | tolisss | 0 σχόλια   
NDepend is the most wonderful analysis tool I have ever found . It can help you by providing metrics of your code or anyone else  code, specify code constrains, analyze code, diff between versions of your code.  It also has an open source license to anyone interested.  I am going to apply the some metrics like the ones Patrick posted here http://codebetter.com/blogs/patricksmacchia/archive/2009/05/21/a-quick-analyze-of-the-net-fx-v4-0-beta1.aspx http://codebetter.com/blogs/patricksmacchia/archive/2009/04/26/the-big-picture-of-the-sharpdevelop-code-base.aspx http://codebetter.com/blogs/patricksmacchia/archive/2009/04/23/ndepend-and-the-quality-of-the-cruise-control-net-code-base.aspx http://codebetter.com/blogs/patricksmacchia/archive/2009/01/11/lessons-learned-from-the-nunit-code-base.aspx

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

Δημοσίευση στην κατηγορία: , , ,
eXpand step 2-Singing assemblies with strong Names
02 Ιουλίου 09 08:29 μμ | tolisss | 0 σχόλια   
We are going to use the same approach as Dx on this one. Dx uses a strong key at DevExpress.Key folder we are going to use it at eXpand.Key folder. All project (*.csproj) files should have an AssemblyOriginatorKeyFile attribute that will point to ..\..\eXpand.Key\eXpand.snk relative path   that way the eXpand.snk will not be embedded to our projects.

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

Δημοσίευση στην κατηγορία: ,
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

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

Περισσότερες Δημοσιεύσεις « Προηγούμενη - Επόμενη »

Search

Go

Το Ιστολόγιο

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

Συνδρομές