Friday, October 30, 2009

IOC by BaseImpl

In this post I am going to provide some why’s on DevExpress.ExpressApp.BaseImpl assembly.

Why it is not signed?

It is not strongly typed signed cause no module is referencing it. By doing so DevExpress encourages users to modify that assembly up to their needs. BaseImpl is only referenced at your front end. Most of Xafers i know have their own version of baseImpl .

If you have your own version of baseimpl development of your domain classes would be much easier
eg.instead of writing code to add a new property to a user though a controller , you could just describe/add that property to user class.

Why persistent classes are there

Xaf has been design to provide a an IOC approach to us. By that I mean that Xaf modules not use or know anything about persistent classes but only for interfaces that are hosted at DevExpress.ExpressApp.Base assembly which is signed and Dv discourages us from modifying.

So when you design a reusable module you should work with interfaces not with real objects

Drawbacks

The only drawback i found is that you cannot use linq to xpo cause you do not know the types only interfaces , maybe dx will provide a smarter way in doing so when they release their DC components

The following should also be true your BaseImpl assembly can reference your modules but your modules as I said cannot reference the Baseimpl.

After realizing what I said above the most obvious question came into my mind

WHY OTHER ORM NOT SUPPORTED?

modules know only interfaces and core can also be configured to use your own datalayer, objectspaceprovider so maybe some people out there have already manage to do so. Sounds achievable!!!

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Thursday, October 22, 2009

Merge UserModel with Application Model

By Martin Praxmarer

Tired of making all DetailView Layout and ListView Layout in the ModelEditor instead at Runtime where you immediatly see the results?

The Solution is eXpands ModelDiffs Module.

Setup:

Create a new User and give it a name like “ModelAdmin”. Next Create a new Role “ModelAdmin Role” – and create a new Model Combine Permission. Set the Modifier to “Allow”, and set the Difference Name to the Name of your Application Model:

image

Now assign the created User to this new Role. Last step is to open the User Difference Model, and set the Model to “Non Persistent” since we dont want to save User changes here. Thats it.

Now you can start your Application, make changes in Detail- and ListViews, and when you exit the Application all changes are merged to the Model which you have defined in your Model Combine Permission!

Cool eh?

Technorati Tags:

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Wednesday, October 21, 2009

Yes Xaf can do it before lunch!!!

Maybe not with the build in modules and not exactly before lunch but the difference between traditional programming and Xafing is really great.

I am going to continue my posts on WorldCreator module and going to inform you about the progress up to here.

  • New persistent objects have been designed and added to eXpand.BaseImpl assembly in order module consumers to be able to change that implementation
  • The code that creates the Dynamic types and synchronies Xpo dictionary and model dictionary  at application startup is there as well
  • Sample application installation created and can be download, so I can get some feedback on it from anyone will play with it

Not Implemented
Create Dynamic types without restarting the application
Not tested for web 
Cannot create associations between Dynamic Types and existent types yet
Scripting not supported yet

Your feedback/help on this one is greatly appreciated

Download Sample Application file1 , file2

UserName:Sam
Pass: empty

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Xaf Tip #10 New DevExpress Xaf module

Today i ll reveal a big and mysterious secret. It seems that DevExpress has a new module that very few people know about it.

I happen to notice it when i try to run feature center demo, cause I have recompile my sources I got a compilation error (have not recompile the secret hidden module ImageSourceBrowser.Win that's why)

image

For you that do not have recompile your sources there is a new module waiting for you.

What it does?

Do not know :(.

I tried searching but nothing so better you ask DevExpress about it

Technorati Tags:

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Thursday, October 15, 2009

Sneak Peak: Dynamic Types with World Creator module

Dynamic Types is one of the most wanted feature in any framework. Luckily me I met Emilio DabDoub of Signia software and one of the Coordinators of XERP project and he hire me to port an old code that he had that could provide that feature and much more into xaf. Also he agreed to publish that module into eXpand.

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Wednesday, October 14, 2009

Saving settings to database instead of cookies

 

THE PROBLEM –> HTTP 400 Bad Request (The data is invalid)

Xaf provides peristent of your web listview setting to cookies using Options | SaveListViewStateInCookies attribute in the Application Model. But due to the limit in request buffer size of IIS your web browser will receive a HTTP 400 Bad Request (The data is invalid) when you overcome it.

DevExrpess suggest you either persist individual listviews in order you never overcome that limit or as Microsoft also suggested here to add a registry value to raize that limit.

SOLUTION

ModelDifference module provides the Options | SaveListViewStateInDataStore that can persist your listview settings to your user model and thus to the database and since your model is persistent also at database

Technorati Tags: ,,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Monday, October 12, 2009

DxCore addin to drop database at design time

When using ORM tools like XPO and even more when using application frameworks like Xaf since they create the database for you you often change your objects so much that you have to drop the database in order your ORM to create it again, in order to avoid any kind of conflict.

Tired of doing that I wrote a small DxCore addin and added to expand addins. To use it you have to configure it by telling which connection string will use from your application configuration file

 image

image

and bind the dropDatabase command to any shortcut key you like

image

eXpand is available at http://code.google.com/p/expandframework/

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Thursday, October 8, 2009

One way associations

If you are tired of writing both parts of an association or if you want to add an association to an object that you do not own check eXpand’s ProvidedAssociation attribute.

Creating OneTo Many

public class Employee:BaseObject
{
    public Employee(Session session) : base(session)
    {
    }
    private EmplyoeeContract _EmplyoeeContract;
    [ProvidedAssociation]
    [Association("EmplyoeeContract-Employees")]
    public EmplyoeeContract EmplyoeeContract
    {
        get
        {
            return _EmplyoeeContract;
        }
        set
        {
            SetPropertyValue("EmplyoeeContract", ref _EmplyoeeContract, value);
        }
    }
}

in the above code i have decorated EmplyoeeContract with ProvidedAssociation and that is the only needed to create an collection of Employess at EmplyoeeContract class for use in both runtime and designtime.

public class Employee:BaseObject
{
    public Employee(Session session) : base(session)
    {
    }
    [Association("Employee-EmplyoeeContracts")]
    [ProvidedAssociation]
    public XPCollection<EmplyoeeContract> EmplyoeeContracts
    {
        get
        {
            return GetCollection<EmplyoeeContract>("EmplyoeeContracts");
        }
    }
}

in the above code I decorate a colection thus saying to eXpand to create a reference object of type Employee at EmplyoeeContract type

Many To Many

public class Employee:BaseObject
{
    public Employee(Session session) : base(session)
    {
    }
    [Association("Employee-EmplyoeeContracts")]
    [ProvidedAssociation(RelationType.ManyToMany)]
    public XPCollection<EmplyoeeContract> EmplyoeeContracts
    {
        get
        {
            return GetCollection<EmplyoeeContract>("EmplyoeeContracts");
        }
    }
}

to make that happen just used RelationType.ManyToMany with ProvidedAssociation

What about adding more attributes to the other type than the Association attribute?

for eg how about making in the first example to make the collection of the other part aggregated?

public class Employee:BaseObject
{
    public Employee(Session session) : base(session)
    {
    }
    
    public static IEnumerable<Attribute> MoreAttributes
    {
        get { yield return new AggregatedAttribute(); }
    }
    
    private EmplyoeeContract _EmplyoeeContract;
    [ProvidedAssociation("Employees",RelationType.Undefined, "MoreAttributes")]
    [Association("EmplyoeeContract-Employees")]
    public EmplyoeeContract EmplyoeeContract
    {
        get
        {
            return _EmplyoeeContract;
        }
        set
        {
            SetPropertyValue("EmplyoeeContract", ref _EmplyoeeContract, value);
        }
    }
}
ps: In order ProvidedAssociation to do its magic you have to use eXpand.ExpressApp.dll
image

see also : How to get eXpand latest version

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Wednesday, October 7, 2009

ModelDifference Module

DictionaryDifferenceStore has been refactored and added the following features

  • Localization Support
  • Multiple application support
  • Ability to change application model without restarting
  • User,Role differences for web and win environments
  • Persist web settings instead of cookies to the database
  • Ability to work as a standalone module without  having to inherit eXpand.ExpressApp.Win.WinComponent/WebComponent as you saw in previous videos

Martin Praxmarer provided great help in that refactoring and I am going to host him here to speak on some of the above subjects and I ll speak on the rest

Here are the issues implemented / fixed issues

see also:How to get eXpand latest version

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Monday, October 5, 2009

How to get eXpand latest version

I have some bad and some good news.

The bad first, until we manage to have full continuous integration in order eXpand new features to be immediately available (nightly builds) we are not going to make any more releases. eXpand release policy will be the same as DevExpress that is we make a release exactly after DevExpress

And now for the good. eXpand will provide build scripts that you can use them to compile the source code. The trunk of source code will contain the most current work.

So you first download the code by going to http://github.com/eXpand/eXpand 

image

and along with the code a set of batch files will be downloaded.

image

You just double click at buildall.bat and eXpand will be compiled and register to the gac. To unregister it use the clear.bat.

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

Thursday, October 1, 2009

Free Microsoft Visual Studio, SQL Server, Windows Server and more

 

  1. Your company builds web sites and web application on behalf of others.
  2. Your company currently has less than 10 employees.

THEN THE FOLLOWING IS GIVEN FOR FREE TO YOU

  • 3 licenses of Visual Studio 2008 Professional Edition
  • 1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)
  • 2 licenses of Expression Web 3
  • 4 processor licenses of Windows Web Server 2008 R2
  • 4 processor licenses of SQL Server 2008 Web Edition
  • DotNetPanel control panel (enabling easy remote/hosted management of your servers)

 

VERY VERY COOL anoucement today by ScottGu as part of the WebsiteSpark program

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

DiggIt!