Testing Goes On: JDBC

JDBC a Go-Go

Today I tested Awesome Sauce Java with JDBC.  It works well!

There are opportunities to develop new tools and functions for the purpose of making the install, configuration, and use easier, but I'm always happy to find another feature works.  Not that it isn't supposed to.  It means that I can validate, test, then learn how to extend the feature.

Here's the code I used to connect to the Derby database in NetBeans:

(setf dbp (new Properties))
(put dbp "user" "app")
(put dbp "password" "app")
(setf cs (new String "jdbc:derby://localhost:1527/sample;create=true"))
(setf conn (DriverManager.getConnection cs dbp))
(setf stmt (createStatement conn))
(setf rs (executeQuery stmt "SELECT * from CUSTOMER"))

(while (next rs)
   (println (getString rs 4))) ; print the company name.

Results in the following detail printing:

"New Enterprises"
"Wren Computers"
"Small Bill Company"
"Bob Hosting Corp."
"Early CentralComp"
"John Valley Computers"
"Big Network Systems"
"West Valley Inc."
"Zed Motor Co"
"Big Car Parts"
"Old Media Productions"
"Yankee Computer Repair Ltd"

I wrote a function to load-tuples, to pass column names, and get a set of tuples back.  I'm going through code today, to find areas where I can add utilities, factor code, and move library code into a useful place.  A lot of the applications I've been writing have grown from prototypes, to working apps, and now they contain code that can be harvested for other applications, so the utility parts are moving into general locations.

Plan for JDBC

Once I've thoroughly tested the JDBC code, I'm going to put together a JDBC application for creating, viewing, and editing tables.  It's a relief to get JDBC validated so I can start using it and stressing Awesome Sauce Java with large datasets.  It's going to be helpful to get a sense of performance of the language in a range of cases.  Plus, I want to have applications take advantage of database-resident data.

Third Party Libraries

I'm going to add integration of third party libraries now that I've got JDBC connected.  I want to have some of the more popular libraries available with the first release of Awesome Sauce Java, especially Amazon Web Services and similar cloud-based services.  I downloaded Google's GMail and Calendar libraries to evaluate everything from licenses to libraries, but I'd like to connect my Calendar application to Google's Calendar code, so I can see if their storage model is as robust as my calendar needs :-)

Today's Plan - Android Layouts & a Graphing App

I started an application yesterday for graphically building Android application prototypes.  The first step is to map architecture and components into a set of interfaces to construct the structure of an Android application - inside and out.  The second step will be to generate code, build the project, and install the application onto a device.

The application builder might leverage Android Studio to build the Android application, by generating the project code and supporting files, but I'll see what makes the most sense to start with and see whether there is more than one path or more than one opportunity to generate working Android code.  I may also build an Android rapid prototyping application, one that's capable of taking layout details and running them right away, similar to other rapid prototyping applications.  They represent a fast mechanism to evaluate layouts when compared to building a full app.  But I also like the idea of being able to prototype fully functioning applications.

The thing I'm going after with the interface builder is the creation of multiple applications - the Android app and the Awesome Sauce Java app for starters.  The Awesome Sauce Java app will be a stand-alone Java application.  Once I have the Android builder working, I'll extend it to iPhone development.

Graphing Application

While working on the code for the Android Prototyping application I started reviewing existing code from existing Awesome Sauce Java applications that I could leverage to help build it.  There's overlap with Awesome Draw, in the event and graphics objects management code, as well as the rendering code.
Like I mentioned earlier, I'm going to be factoring common functionality into library code.

One of the more interesting parts of building a language is learning how many different layers and libraries there are for each set of functionality.
The first step has been to learn how the language works, while smoothing the rough spots and edges.

Now that the language is becoming more stable, it's possible to smooth the edges where the applications come together.  Today I'm hoping to have a cleaner Awesome Draw app, as well as a library of functions that work for it.  The libraries will also provide leverage for building the new applications I'm working on today: the Android rapid prototyping and Awesome Graphing applications.

Have a great day!

Comments

Popular posts from this blog

I Was Studying Exceptions, But Got Confused, So I Luckily Designed The Code Editor Instead

Just a Short Update

A Day Away From a Glowing Screen