Monday, July 26, 2010

Mockups - Free tools

NetBeans E-commerce Tutorial shows how to use mock-ups but not how to make them.

Obviously you could use a piece of paper and a pen but there are also some software solutions, both commerce and free.

I have used a free one - Pencil to mimic one of the NetBeans E-commerce Tutorial's mockup. Here's the result of my roughly 15 minute work :

Looks a lot better than if I'd draw it by hand, but is the extra effort worth the result ?

My friend says no. He says that there is software for prototyping webpages, even browser-apps, and some people say that for prototyping the best thing is powerpoint.

Me, I'm not sure. If its for me, I'd stick with a paper and pen. For showing other people I'd probably use one of the mentioned tools.
Not because I draw so badly but because some of aspects of the mockup are complemented by things in noted your mind, like how the colors will be. It's easier to show them with a software tool to other person than with a piece of paper.

What do you think ?

The NetBeans E-commerce Tutorial

For some time now I've been looking into Java EE. Again, first step into the unknown is the hardest.

After getting the new Netbeans (6.9) I have stumbled upon The NetBeans E-commerce Tutorial.
I think it is a great way to learn some aspects of Java EE and how to develop commercial software/webpages.

The tutorial shows how to setup a simple website for a grocery shop, that allows people to order their products. It shows how to eficiently use the IDE (NetBeans) and MySQL workbench to connect the database (MySQL) to the business logic (Java) and the webpage (JSP, HTML, CSS).

It also shows the whole process of developing a commerce application starting with a scenario, gathering customer's requirements, use-cases, mockups and so on. The code part is based on a design pattern called Model-View-Controller, which is explained in the tutorial but if you'd like to know more here's a good resource.

Over the next few posts I'd like to show how to do the above but using a PostgreSQL and pgAdmin III.

You can download PostgreSQL as well as the admin tool here. I have used a standard setup but included jdbc4 for installing.

You start by doing exacly what the tutorial says until "Communicating with the Database Server".
At this point you copy the postgresql-x.x.-xxx.jdbc4.jar file to the {glassfish}/lib directory.
Now you should restart glassfish server by :
  • going to services [tab]->servers->glassfish 3  right-clicking and selecting restart (or start if its offline),
  • or asadmin stop-domain domain1
    asadmin start-domain domain1
After that you right-click on the services [tab]->databases. Choose New Connection. Select PostgreSQL as a driver and fill out the rest of your form with necessary data. For me it looked like that :

 Sorry about the language on the right side but I was unable to change it to english. I think that the icons are explanatory though.
After you accept you will be prompted to choose the schema. Note that in my case I was unable to change the default schema after creating the connection (despite the option) so you might want to create one beforehand in pgAdmin.

After connecting you should be able to create tables, views and procedures in you database by Netbeans.

If it does not you might find some answers on this site which I used to figure it out in the first place or just post a comment here/mail me.

Soon I'll post how to create the necessary tables from Designing the Data Model.

Thursday, July 1, 2010

New things !

As I am past all my exams and very glad of it I'm tending to my much neglected blog.

The summer has finally started for me but I'm looking for work. The goal is a position of a programmer in one of the companies in my city. Today I've finished my CV and sent it to a friend for checking. If he approves then I'll send it to every interesting company I'll find. I recon a month should be enough to find something.

As you can see I've changed the design of my blog and adjusted the code displaying script. It's a simple template from Blogger, but still I like it very much.

Lastly our little robo-project has been compleated. The final stage was to remove the parts responsible for communication with the PC, add a microcontroller and program it.

We have put in a Atmega 88 20pu microcontroller and wrote a simple active-polling program, compiled it with avr-gcc and then used  USB AVR ISP I and avrdude to write it to the microcontroller.

The code was written in c using avr libc.

Avr dude gui, a program providing gui for the avr programmer, proved to be buggy - didn't write data to the microcontroller.

You can watch the video of the whole operation here :

A little note : the beginning is shot on the junkyard; one of the objectives was to make the robot cheap. To be honest, in the end we didn't actually use any of the parts salvaged from there.