[jboss-user] [JBoss Seam] data modeling 101
José Moreira
jose.moreira at josemoreira.net
Fri Aug 31 14:18:27 EDT 2007
Hello,
this is not directly related to Seam but...
im starting to develop an application with Seam and i have the following
business case:
the webapp will allow car shop dealers to manage their business.
- the application will have 2 roles, 'customer' and 'system admin'
- the customer can have multiple accounts for it's employees, each with
the same permissions
- they will have an auto stock management composed of multiple vehicle
types (cars, boats, motocycles)
- they will have file attachments, notes, tasks and events related to
vehicles
- the admin role can supervise all information from the customers,
manage their accounts and create adittional admin accounts
- the will be a CMS module (pages with blocks and sub-pages mostly) to
on-line administer static site content like help, faq's, contacts, etc.
Only admin's have permissions
- the website will be composed of 3 'logical' parts:
* the public site which will allow customers to register, perhaps demo
accounts will be available or should be considered. also it will have
static information / pages like a normal website
* the private part where the customers manage their business after login
* the administration back office for system admins.
Of course i'm not expecting for you to architect my application :) but i
have doubts about how to implement this in Seam.
This will sound stupid but ... some doubts are:
- If the customers are groupped by it's "company", the information
(vehicles, etc) should be attached to the company not the customer right?
- Are Stateless Java Beans appropriate for this case? I would very much
like to delegate bussiness logic to classes outside the action listeners
(if i'm saying correctly)
- How can i / should split the interface in the 3 parts: public,
customer and administration?
for example the customer will have forms and lists with their vehicles,
manage their employees accounts, etc.
the system admin will have to have access to the same information (plus
administration) but in a different interface (for example to correct /
verify some information) but using the same interface / login seems
wrong unless another interface is presented if the user is an admin.
So the thing is about code (view/model) reuse between the customer
interface and the admin interface.
Somehow it doesnt make sense for the admins and users to login from the
same frontpage. Can i share the same Authentication but redirect to
another part of the application afterwards
Also for example, if a customer adds a vehicle, the vehicle will be
attached to the logged in user company, but if its an admin that
inserts/edits a vehicle, it will have to be attached to a customer
(perhaps previously selected). So the forms/components must be prepared
for that right?
- The vehicles share common properties but will have to be sub classed
because for example a car doesn't have a 'sail type'.
So i'll create a base Vehicle class and use inheritance to create a
Car/Boat/Motocycle.
How to and what problems will i have adapting the forms to the subclasses?
kind regards,
--
Melhores cumprimentos,
José Moreira
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3281 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.jboss.org/pipermail/jboss-user/attachments/20070831/b38a0360/attachment.bin
More information about the jboss-user
mailing list