[Express] Derby [JavaDB] database reads?

I need to develop HTML that reads data from an Apache Derby Database and construct a series of on-line reports.

I have a trial Freeway 5 Express version with a need to buy either Freeway 5 Express or Freeway 5 Pro by Jan 11th.

I constructed the Derby Database from a Java stand alone application via the Java DBMS interface and have a set of Java methods designed to read Derby Database fields given the table name and the field names.

Ideally, I would be able to reuse these Java methods.

Questions:

  1. Can I read Database files using Freeway 5 Express or do I need Freeway 5 Pro?

  2. Can you point me to to some documentation / tutorials that will assist me in the above efforts.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can do almost anything in Express, if you are willing to do things long-hand.

You could use the canonical page sections found within the Page / HTML Markup dialog (before/after HTML, HEAD, BODY) to insert library code elements, and within the page itself you would use Insert / Markup Item to place sized elements or in-flow snippets of code.

In Pro, there is a much larger universe of Pro-only Actions that can help you with more exotic constructions such as what you outline here. My own TemplateHelper and CrowBar Actions would be indispensable for creating a precisely controlled final result, but they only run in Pro.

That said, Softpress are unusually generous with their upgrade policy. If you buy Express, and it doesn’t do enough for you, a copy of Pro will cost exactly the difference in retail price, nothing more. And you get to keep both licenses, I believe.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,
Thanks for your reply.

I’ll read up on “Actions” and your specific actions next.

I’ll most likely go with Freeway 5 Pro in lieu of Freeway 5 Express. I may want to use some CSS to “doll up” my reports and I think doing CSS from Freeway 5 Express is also more work than I need at this point.

I have a question on your “get to keep both licenses” statement.

Isn’t Freeway 5 Express a subset of Freeway 5 Pro?

OR would there be another “learning curve” if I upgraded from Freeway 5 Express to Freeway 5 Pro?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The two interfaces are nearly identical. The differences are in the
details of what you can do with individual elements of your layout,
and thus the controls you need to adjust those details.

The basic metaphor is identical in the two apps, and your method of
work is nearly so.

I started my career in Freeway 1 (long before there was a Pro/Express
split) and thus have stayed in the Pro camp by default. But I know
that a lot of people do some remarkably sophisticated stuff with
Express.

Ironically, because you have to “get out and push” more often in
Express, those users who exceed its boundaries end up understanding
HTML and CSS more thoroughly than those who have relied on Pro’s
native tools to build it for them.

Walter

On Jan 8, 2010, at 1:36 PM, Jim Crowell wrote:

Walter,
Thanks for your reply.

I’ll read up on “Actions” and your specific actions next.

I’ll most likely go with Freeway 5 Pro in lieu of Freeway 5 Express.
I may want to use some CSS to “doll up” my reports and I think doing
CSS from Freeway 5 Express is also more work than I need at this
point.

I have a question on your “get to keep both licenses” statement.

Isn’t Freeway 5 Express a subset of Freeway 5 Pro?

OR would there be another “learning curve” if I upgraded from
Freeway 5 Express to Freeway 5 Pro?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

I found the actions you referenced on ActionsForge. I read them, but so far, I do not see how they help me access my Derby Database?

I searched ActionsForge more and found “MYSQL Connect” and “MySQL Get Records” actions. Derby is very much like MySQL so I believe these are close to what I need. These two actions use PHP which I know little about. I think I am on the right track and that, with some effort, I can connect and get records from my Derby file.

I viewed the “Get Started” video’s and found them to be helpful.

Many Thanks…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Those Actions I recommended (and Freeway) will help you build the
“View” part of your application. The “Model” is your Derby app and the
functions or methods you have written in Java to access it. The
“Controller” part will have to be written by hand to control the
various methods you want to expose to the world. Freeway itself does
not connect to any databases – all it does is generate static HTML
pages. The PHP/MySQL Actions are tightly bound to that language and
database, and will not serve you at all with a Derby database.

In order to make a Web-facing database application, what you generally
need to do is create templates containing placeholders or brief
program statements indicating where to place the dynamic content on
the page. Then there are a few different methodologies that you can
use to assemble these templates with the dynamic content and serve it
to your visitors, and which one you choose has a lot to do with your
server environment and the programming language you use.

I generally use the Front Controller design pattern in my own work. I
use an .htaccess file in the Apache server to redirect every request
that is not for a real file or folder to a single PHP script. This
(very small) script reads the URL that was requested, and interprets
which controller to hand the request to. That controller then takes
care of presenting what was requested by getting the correct data,
pushing it through the template, and printing it to the browser.

Walter

On Jan 8, 2010, at 5:01 PM, Jim Crowell wrote:

Walter,

I found the actions you referenced on ActionsForge. I read them, but
so far, I do not see how they help me access my Derby Database?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

Thanks for that great response.

Saturday I’ll study your inputs and try to get my mind around it. My solution gets more complicated because I’ll need to produce the Derby Database fed HTML reports in two modes as follows:

  1. Local mode using the Derby Database residing on the HDD. I’ll invoke the Internet Browser from my stand alone app.

  2. WWW mode using the Derby Database residing on my Server.

Ideally, I require that the “Report Generator” HTML seamlessly interacts with the Derby File in either mode.

Bottom line I need to read data from a Database and produce a series of reports = F[Derby Database parameters].

I will probably use JSP to interact with my server in the WWW mode. The Server hosted JSP code shall setup a session with the HTML and service the Derby Connect and Query requirements.

In the “Local Mode”, hopefully I can use the JSP cod,e in the stand-alone in the Java Application to setup a session that get the Derby data from the Derby HDD file?

Question:
Given the above scenario is somewhat close to reality, it looks like I will need a way in Freeway 5 to invoke Java code from the Browser. Is that capability available in Freeway 5 Express?

I think I’ll still need Freeware 5 Pro to spruce up my report via CSS.

Thanks again…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can use either Pro or Express to insert snippets or blocks of code of any kind through the HTML Markup dialog or the Markup Item page element. You could use this to either create your JSP page directly (simply change the filename extension in Freeway’s Inspector) or let Freeway make its usual HTML page and do something clever in Java to consume that template and replace its variables before serving it.

I’m a little confused about what you’re planning to do locally – I believe you’ll need to have a local web server of some kind running to make any of this work – because JSP doesn’t work unless it gets interpreted by an application server. Perhaps this Derby server runs a web service on port 8080 or similar for testing purposes.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 9 Jan 2010, 1:50 pm, waltd wrote:

I’m a little confused about what you’re planning to do locally – I believe you’ll need to have a local web server of some kind running to make any of this work – because JSP doesn’t work unless it gets interpreted by an application server. Perhaps this Derby server runs a web service on port 8080 or similar for testing purposes.

I think you are right about the JSP local usage. I am trying to write the reports HTML code once and the JSP code once but it looks like it can’t be done.

I guess I’ll need to have different Derby access methods depending on what mode I am in. WWW mode uses the JSP.
Local mode would use Java code to connect to and query the Derby Database file on the HDD. Hopefully, there should be some Java method re-use in the two methods.

I may have created more work for myself with the “local Mode”. I have a requirement to produce the reports locally and on the web. I decided that I could use the same report generation method [HTML] by having the Java stand-alone application use my clients default Internet Browser to produce, view and print the reports.

The original report generator was going to be produced via Java methods independent of the browser. The WWW report generator was always going to be using JSP / HTML. At this time the reports are kinda vanilla [e.g. Net Worth Statement] but later they may become more challenging.

I do not know of any application that use this approach, i.e. invoke the default browser as the report generator. So I am a little apprehensive about it. Perhaps I should just write a Java Stand-Alone report generator and forget about the “Local HTML Mode”?

Anyway, as far as Freeway goes you have answered my question nicely. Thank you very much for your additional comments on my design implementation.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you set up a shell script to launch the relevant processes, then
you could easily use the same application over the Web and locally.
But it’s going to require that the client computer have a working Web
server, a Tomcat or another JSP container, and the necessary paths set
to access the Derby DB. If your client is running MacOS, then this is
going to be very simple. On Windows, it’s more work to set up, but it
can be done.

If you want to have a user interface for the report system, and you
don’t want to write all that in Swing as well as in JSP, then you
might want to investigate this.

Walter

On Jan 9, 2010, at 10:45 AM, Jim Crowell wrote:

The original report generator was going to be produced via Java
methods independent of the browser. The WWW report generator was
always going to be using JSP / HTML. At this time the reports are
kinda vanilla [e.g. Net Worth Statement] but later they may become
more challenging.

I do not know of any application that use this approach, i.e. invoke
the default browser as the report generator. So I am a little
apprehensive about it. Perhaps I should just write a Java Stand-
Alone report generator and forget about the “Local HTML Mode”?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 9 Jan 2010, 4:27 pm, waltd wrote:

If you set up a shell script to launch the relevant processes, then
you could easily use the same application over the Web and locally.
But it’s going to require that the client computer have a working Web
server, a Tomcat or another JSP container, and the necessary paths set
to access the Derby DB. If your client is running MacOS, then this is
going to be very simple. On Windows, it’s more work to set up, but it
can be done.

If you want to have a user interface for the report system, and you
don’t want to write all that in Swing as well as in JSP, then you
might want to investigate this.

Your above suggestion is definitely worth looking into.

A user interface is required in both modes. At a minimum the end user shall select the form to be displayed.

How unusual would this be?

On my XP node I use FrontPage 98 to build web pages.
When I enter the FrontPage Explorer it sets up a “Front Page Personal Web Server” in it’s own process. I think it may be required if FP extensions are used in the constructed HTML. As long as the end user terminates FP98 properly, the Web Server is removed.

If my kernel did something similar it would have to be responsible for the housekeeping! Also, would setting up a Web Server process add greatly to my System Requirements?

My initial application [Survivors List PLUS] market is horizontal but my primary customer would be Seniors who I would think do not upgrade their computers often.

Just thinking out loud.

Thanks again. I will look into it.
Jim…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Wow. Talk about a tough nut!

You might want to think about finding a ready to use local server
written in Java, and put a shiny face on that. It would mean a fairly
large download for your users, but you would be in complete control
over the finished product. Your application would start a Web server
on a high non-standard port, then pass a system request for the URL
(something like http://localhost:9090/path/to/the/files), and the
default browser would open it. This could work on both Windows and Mac
OS if you got the basics done right.

I haven’t written a Web server in Java before, but in Ruby it’s about
7 lines of code (importing massive standard library widgets and
calling them). The advantage to doing all of this in Java would be
that you could include everything your application needs in one Jar
and not worry about any dependencies.

This is more or less what FrontPage does in order to allow local
testing. You can also see something similar in Locomotive, which is a
Ruby on Rails development “sandbox” that runs in normal user space on
Mac OS.

Walter

On Jan 9, 2010, at 1:30 PM, Jim Crowell wrote:

On 9 Jan 2010, 4:27 pm, waltd wrote:

If you set up a shell script to launch the relevant processes, then
you could easily use the same application over the Web and locally.
But it’s going to require that the client computer have a working Web
server, a Tomcat or another JSP container, and the necessary paths
set
to access the Derby DB. If your client is running MacOS, then this is
going to be very simple. On Windows, it’s more work to set up, but it
can be done.

If you want to have a user interface for the report system, and you
don’t want to write all that in Swing as well as in JSP, then you
might want to investigate this.

Your above suggestion is definitely worth looking into.

A user interface is required in both modes. At a minimum the end
user shall select the form to be displayed.

How unusual would this be?

On my XP node I use FrontPage 98 to build web pages.
When I enter the FrontPage Explorer it sets up a “Front Page
Personal Web Server” in it’s own process. I think it may be required
if FP extensions are used in the constructed HTML. As long as the
end user terminates FP98 properly, the Web Server is removed.

If my kernel did something similar it would have to be responsible
for the housekeeping! Also, would setting up a Web Server process
add greatly to my System Requirements?

My initial application [Survivors List PLUS] market is horizontal
but my primary customer would be Seniors who I would think do not
upgrade their computers often.

Just thinking out loud.

Thanks again. I will look into it.
Jim…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options