Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: First real project with puremvc : is my plan good ?  (Read 11714 times)
fidiman
Full Member
***
Posts: 23


View Profile Email
« 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.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
fidiman
Full Member
***
Posts: 23


View Profile Email
« Reply #2 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 ?


Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 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>
Logged
fidiman
Full Member
***
Posts: 23


View Profile Email
« Reply #4 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 ?  :-*
Logged
marek
Jr. Member
**
Posts: 14



View Profile WWW Email
« Reply #5 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.
Logged
fidiman
Full Member
***
Posts: 23


View Profile Email
« Reply #6 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 ;)
Logged
Pages: [1]
Print