Robert Hendley wrote:
> I am a php developer mainly. And am in the learning curve for
> JSP/Servlet development. I am sold on Stuts, I have read 20+ articles on
> Struts and have found them helpful. My problem is information overload.
> I am trying to port a php application to Struts that manages inventory
> and invoicing. I am wondering if any one has written an application like
> that using Struts. Or if one could give me some direction on where to
> start. I have deployed several webapps with success and used a cookbook
> approach to modify and tweak etc.. So if you have a moment I have a few
> questions.
> 
> 
> 1. How did you handle record locking ? As an example editing a customer
> record and not allowing two to edit at the same time.
>    I am thinking a hash but where to put it?

Most of us do optimistic, or like a timestamp column.


> 
> 2. I want to have a cache at the application scope of the "open"
> invoices
> , approx (100-200) about 1k each. The application currently uses 27
> tables, so any invoice can require up to 12 queries(I did not design the
> schema)I have no real idea where to start with this.

If it does not decay, you can make it application scope singleton R/O.
A lot of clients buy the O/R and then they do not design the model 
relational, or have it done by somone who read a book on relational 
design, 6 months of experience (degree in MIS, they must teach that? 
:-), HUge difference in SQL written by 3 years of SQL experience, vs 6 
years, 9, etc. I have been on clients that have 8 way joins and more, 
and they would say things like we read that the model is not important. 
Other readers note that this is more of a realistic problem, not desgin 
patters of VO/DTO)

Alternative, Poolman (sourceforge) can cache the results of a query.

Commons pool can cache your own objects. I use CachedRowSet, where you 
can store your massaged resulsts. Maybe your best bet.

Maybe...  have a cache/optimization "memory" db  of my own design, (ASA, 
pgSQL) that I would use that matches use design. That db would then run 
a cron job and use procs in pgSQL or transactSQL to sync up to old db.

You are not going to have a standard Struts project, but something with 
a complex model.

> 
> 3.What if any advice could you give for a navigation system that has
> properties that are only available to a user/group?

I use StrutsMenu on sourceforge for navigation. It has some new features 
to let you turn on / of menu items.
You could do getUserPricincapal() and based on it do a select of groups 
they are in. Store the group in session. Then turn/on /of menu items.


hth,.V

> 
> Thanks
> Robert Hendley
> [EMAIL PROTECTED]




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to