PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: fidiman on September 24, 2008, 01:44:31



Title: First real project with puremvc : is my plan good ?
Post by: fidiman on September 24, 2008, 01:44:31
Hi,

After playing a little bit with puremvc. I start to planning a real project with it.

The project is an little e-commerce website.

The back offfice is under flex with puremvc

The front office is flash based with puremvc too.

First question : how can i re-use some puremvc code produced for back office to front office (methods for CRUD service for example) ? i mean in a architectural logic ?


Second question :
for the back office i see the thing like that :

2 states :

- 1 state for login operation that use puremvc for requesting database via model and service delegate


- 1 state for admin opération, that display a viewStack.

 Each view of the viewstack :
- use a specific component to display data

- manage one Value Object and use the puremvc logical to do it (CRUD via webservice...)

What are thinking about this plan ? is it a good way ?

Thanks again.


Title: Re: First real project with puremvc : is my plan good ?
Post by: puremvc on September 24, 2008, 07:33:19
You want to focus on making the model classes portable. One way is to begin now by making three separate projects:

  * Front-end Flex app

  * Back-office Flex app

  * Common Flex library

Put all your model classes (proxies, VO's, Enums, etc) in the Common library.

Makr the other two Flex apps depend on this library.

Now, constants common to the model itself define on the proxies (such as ProductProxy.PRODUCT_RETRIEVED) or in a separate class (such as CommonConstants.PRODUCT_RETRIEVED).

This will keep you from relying on anything view-specific in your model. Each app has its own use-cases, carried out against a common domain model.

-=Cliff>


Title: Re: First real project with puremvc : is my plan good ?
Post by: fidiman on September 24, 2008, 10:44:18
thanks again Cliff,

Is there's a way to have front end made with flash and back end made with flex ?




Title: Re: First real project with puremvc : is my plan good ?
Post by: puremvc on September 24, 2008, 02:51:46
No problem at all. Just make sure your model classes work either way. You won't be able to take advantage of the Flex service classes...

-=Cliff>


Title: Re: First real project with puremvc : is my plan good ?
Post by: fidiman on September 25, 2008, 12:20:55
i was thinking that just values objects can be reuse .


ps : why am i alone in this forum ?  :-*


Title: Re: First real project with puremvc : is my plan good ?
Post by: marek on September 26, 2008, 04:25:06
not alone. I have been almost everywhere but just joined so will try to put my fingers into it. I like the idea of having common library that can be used by both front and back end. Someone in the company I work has created common lib for all projects. It is kind of cool and work fine as long as you don't use SVN without proper tagging and branching.


Title: Re: First real project with puremvc : is my plan good ?
Post by: fidiman on September 27, 2008, 12:14:30
hi,

cool, we are two now  ;D

finally, between front and back the only thing that change is the view (and under flash the connection service )...

i'll report my experiment soon ;)