import-bot (20212) [Avatar] Offline
#1
[Originally posted by dhartwig]

Howdy. Am enjoying the book so far, (am fairly new to EAServer) but I have a
question or two...

Question 1)

I'm trying to grab onto the concept of EJBs vs. Stored procedures. If I'm
going to develop a Web app, can I put all my business logic in EJBs on Jaguar?
Do I not need to worry about someone trying to access the database directly
(referential integrity)? (warning: I'm coming from the mainframe world, so be
gentle...) It seems that Sybase is trying to indicate that the MASP is for
'regression' of existing systems, not necessarily for new projects, (I'm
starting fresh...) is that a fair interpretation?

Question 2)
Web DataWindows. You don't speak much to them it seems. I'd like to take
advantage of them for data display (and maintenance) and then invoke EJBs for
the application logic. Is this realistic?

Thanks in advance for your reply.

Dan
import-bot (20212) [Avatar] Offline
#2
Re: stored procedures?
[Originally posted by mbarlotta]

Dan

> Howdy. Am enjoying the book so far, (am fairly new to EAServer) but I have a

Glad to hear it!

> Question 1)
>
> I'm trying to grab onto the concept of EJBs vs. Stored procedures. If I'm
> going to develop a Web app, can I put all my business logic in EJBs on Jaguar?

That is the recommended approach.
You want the Jaguar server to control the transactions. If you can write a sp
and still leave control of transaction to Jaguar you are probably OK, but EJB
purists might not recommend this.
I have not tried using a sp from Jaguar.

> Do I not need to worry about someone trying to access the database directly
> (referential integrity)? (warning: I'm coming from the mainframe world, so be
> gentle...)

I would think some RI would still be desired. But "all" access is considered
as going through the components/EJB in most n-tier design. If that is not the
case then you may want to add more RI.

Also the database is accessed from single user (Jaguar) so can protect
database by not giving users database user id and passwords forcing them to
access database through the Jaguar server.

>It seems that Sybase is trying to indicate that the MASP is for
> 'regression' of existing systems, not necessarily for new projects, (I'm
> starting fresh...) is that a fair interpretation?

MASP in general is not a recommended way to develop & access components,
especially if you have not already.

>
> Question 2)
> Web DataWindows. You don't speak much to them it seems. I'd like to take
> advantage of them for data display (and maintenance) and then invoke EJBs for
> the application logic. Is this realistic?
>

I am not a fan of the Web DW. You probably could rig some objects in the HTML
/ Web DW component or use "service components/objects" (see HTML DW
documentation - these are not Jaguar service objects) to call EJB and process
logic.

Mike
import-bot (20212) [Avatar] Offline
#3
Re: stored procedures?
[Originally posted by dhartwig]

Mike,

Thanks for the quick response(s)!!

One more question, as far as the Web DW, it seems to me that it's a real
separation of the 'presentation logic' from the 'business logic'. We're
porting mainframe functionality to an n-tier 'thin client' and then will
deliver source code to our customers. For ease of training, multi-platform
compatibility and customization options, the Web DW seemed like a good
choice...

Would you expound a little on your reasoning for not being a fan?

What do you prefer for coding the presentation layer? (Just JSPs?)

We'd like to stay away from thicker clients, so Java Swing's out...

This make sense?

TIA (again)

Dan
import-bot (20212) [Avatar] Offline
#4
Re: stored procedures?
[Originally posted by jweiss]

> Mike,
>
> Thanks for the quick response(s)!!
>
> One more question, as far as the Web DW, it seems to me that it's a real
> separation of the 'presentation logic' from the 'business logic'. We're
> porting mainframe functionality to an n-tier 'thin client' and then will
> deliver source code to our customers. For ease of training, multi-platform
> compatibility and customization options, the Web DW seemed like a good
> choice...
>
> Would you expound a little on your reasoning for not being a fan?

Like Mike, I too avoid the WebDW. My personal experiences early on with the
Web DW have been poor. Different presents based on the type of browser, very
fat (i.e. a lot of wasted code even when you turn off various validation
rules) and difficulty in attaching elaborate business rules-- rules that
require more than just simply field level validation offered by the DW. In
fact, this last reason alone routinely leads me to writing a full-fledge Jag
component (either PB or EJB) to run the business logic. Prior to 3.6, JSPs
were not an option, so we used a combo of servlet's and PowerDynamo web pages
to invoke the Jaguar components. It is my understanding that the C3 release
of PowerBuilder added greater granularity and flexibility when dealing with
Web DW validation rules, but I haven't had any time to explore. Frankly, with
JSPs readily available, I'm not sure I ever would go back to the Web DB (read
I am pushing people towards a more Java oriented solution).

>
> What do you prefer for coding the presentation layer? (Just JSPs?)
>

Since 3.6, JSPs is my preferred approach

> We'd like to stay away from thicker clients, so Java Swing's out...
>
> This make sense?
>
> TIA (again)
>
> Dan



HTH,

Jason Weiss