You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robert Hendley <ro...@walts.com> on 2002/10/16 05:28:00 UTC

Newbie Questions / Direction

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?

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.

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

Thanks
Robert Hendley
rob@walts.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Newbie Questions / Direction

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
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
> rob@walts.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Newbie Questions / Direction

Posted by James Mitchell <jm...@telocity.com>.
Hi Robert,

Struts does not provide any type of support for data storage or retrieval,
those details are left to the developer.  In fact, discussion of such topics
on this list often lead to pissing contests over EJB vs. RowSet.

I (personally) use OJB (http://jakarta.apache.org/OJB) not only for the
benefit of O/R Mapping, but also connection pooling and caching.  (Too many
features to list here)


For role-based navigation, you might try searching the archives, I’ve seen
it mentioned a few times in the past.


James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org




> -----Original Message-----
> From: Robert Hendley [mailto:rob@walts.com]
> Sent: Tuesday, October 15, 2002 11:28 PM
> To: Struts Users Mailing List
> Subject: Newbie Questions / Direction
>
>
> 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?
>
> 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.
>
> 3.What if any advice could you give for a navigation system that has
> properties that are only available to a user/group?
>
> Thanks
> Robert Hendley
> rob@walts.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>