Perharps the single most important implementation decision a web programmer must deal with is their choice of platform. When you start coding, the server-side components are usually specific to a language or platform. As an example, if you choose IIS, you'll initially be stuck with Microsoft technologies; if you choose Apache Tomcat, you are choosing the Java path. Of course plugins abound that enable additional features, such as Tomcat behaving like an IIS server, or to run PHP scripts, etc. But this decision usually determines what "camp" you belong to.A basic web server simply responds to HTTP requests and socket connections. Since we are leaning towards implementing our solution in Java, there are plenty of servers - as listed here on Java-Source - that are free/open-source. Apache Tomcat is perhaps the most popular web server on the Internet today. Though in this exercise, we'll be using the Sun Java System Application Server, which comes bundled with the NetBeans IDE. As usual, I choose web servers based on how easy they are to configure, if my favorite IDEs support them, if they can be debugged on, level of complexity to extend, ease of deployment, and industry reviews that may suggest their performance is production grade. Later as your application grows, you start worrying about clustering and load balancing, response times under pressure, security, etc.A scenario was presented in a previous post: the need to implement a simple timecard utility. To be able to do "live mockups", you need to have a real web server to which is deployed a foundational prototype. To start with, we'll create a simple application that dishes out HTML representing a basic UI. Instead of using plain HTML files, we'll take advantage of JavaServer Pages to generate the HTML. It also sets us up to use servlet technologies to respond to HTTP requests and ability to dynamically generate content. Many other server-side technologies do the same thing, including ASP, PHP, and ColdFusion, for example.Often when you do web design, you start with mockups of how the final product might look like. Along with requirements from your client, you might then come up with use cases and such. We'll use NetBeans 6.0 (M10) to create a simple HTML based mockup:- Create a new web project: File | New Project. Choose Project = Web -> Web Application. Project name and location = TimecardWebApp; context path /Timecard. [Finish].
- Design your page: index.jsp should be open in the IDE. Just code HTML into this page. Here's HTML code of what's needed to produce a mockup. NetBeans includes a palette that allows you to generate code for basic components using simple drag-and-drop onto the page.
- Run the application: right-click the web application -> Run Project. This will start up SJSAS, which is our web server in this context, deploy the web application to it, and open up the page in your default web browser. It should open at http://localhost:8080/Timecard/.
That's all for this step, and you should have something that looks like this:
Of course this page does not do anything yet. We are only interested in the look of the application in order to visually show the client what we will be able to do. The idea is that a user will enter the hours they came to work, took their lunch, left for the day, and any holiday or sick hours awarded. When they hit [Update], it should update the totals. That's all for now - additional features will be added later as the client specifies them (in future posts).As you can see, IDEs such as NetBeans make web development a snap. Beware with v6.0 M10 though: the full package install take upwards of a minute to get started, and code completion/JIT is still painfully slow. But the advantage with using this IDE is its simplicity of use, available features, and how quickly you can get applications done. Of course whenever we need to implement something, we'll try it first in NetBeans; if it's not possible or there's a better way, we don't want to feel stuck in this IDE.
In these days when even grandma can design and maintain a website - sometimes for free, what value can a web designer or programmer add to justify paid work and interest in their product? I get pretty irked by designers that crank out solutions in pure HTML, and fail to take advantage of web technologies and standards that'd enhance the user experience, make design/programming a breeze, and take advantage of the latest technologies. Most of these things are available for free on the web.So after chatting with a few developers that are stuck in HTML-only web design, I decided to start this series to demonstrate how you can take a simple HTML application and use all kinds of standards and technologies on it. I'm talking Javascript, CSS, Flash, AJAX, Direct Web Remoting (DWR), JSF, and a myriad other web tooling and presentation APIs, such as Yahoo!'s, Facebook's, or and Google's. I'll approach this series from a Java perspective, exploring everything from using EJB 3.0 for your data layer, various design models and patterns that may apply, and considerations for developing your own components for improved efficiency. We might also touch on issues with various containers and application servers, load-balancing (in code?) and taking advantage of modern IDE features that take the headache out of programming and design. What about designing for mobile devices? We'll see how that can be done.Another idea is to find a good application or website and reverse engineer it - that's the ultimate learning curve. Since this is essentially "educational" and "research", you are not bound by copyright and other legal issues - as long as you don't steal their code.Finally, integration with .Net and other technologies is a possibility. What would it take to port application to various environments, or at least have them play together? Of special interest will also be finding out which is the easiest and least expensive way to implement such a solution.The application I'm choosing for this exercise is a simple timecard utility that can be extended to include features related to time management. This doesn't sound hard, does it? I mean, you can have a prototype literally overnight. All it does is present an interface where users can punch in the hours they worked, and it calculates the usual paycheck. The basic prototype is manual and simple, but it enables us to have something simply functional and see how the various technologies can be used to enhance it. Simple goal.That said, I'll do Java development in the NetBeans 6.0 (M9) IDE. It comes with the Sun Java System Application Server 9, and that's pretty much all that's needed at this point. Of course you should already have a Java EE 5-aware JDK (1.5 or later). Eventually, we'll need a database to store our information.
I hear Yahoo! and other major websites were hit with a DDoS attack over the weekend, resulting in several outages across their web services. It's been 48 hours now since I was last able to access web mail from Yahoo!. Being a premium member, that means I can't get my business mail through POP3/SMTP either. But thank God for alternative [free] mail services - I pity anyone that depended solely on Yahoo! for their mail needs.
Unfortunately, an event like this is all it takes to pull the plug on my accounts there. I know their IT team is frivolously working to resolve the problem, but 2 days is too long for some of us to handle. Worst still, there's no public statement about the problem, sometimes causing users to question their connections or wonder if they are being blocked somewhere. Luckily, IM still works.
This is a Christian reggae song, based on an old Pentecostal chorus. This rendition is done by Luciano on his Great Controversy (2001) CD - a very good listen indeed. Between me and a friend, he's what we think are the words to this song - because of the artists' accents and rhythm of the song, some areas are still unclear. If you are Facebook, I have this file in my files that you can listen to ... perhaps you can correct us:[1-4] hallelujah! (echo) jah is nigh .. [ad lib]amen (let me hear you say)amen (let me hear you now)amen, amen, amen! (let me hear you now)selah (let me hear you say)selah (let me hear u say)selah, selah, selah!he who has eyes then let him seein this time of prophesythe hearts of the bad poise a threat to the victoryand i know it's not to behe who has ears then let him hearcomin' of jah kingdom is very nearwhat a man sow when he sow shall he reapso i'll give jah my soul to keeplet me sing again ... amen (everybody sing)amen (let me hear u say)amen, amen, amen! (let me hear you now)selah (everybody sing)selah (let me hear u say)selah, selah, selah!woe be onto mankindwho deny the mastermindpeace on earth only few men findin this revelation timepeople you've been living wrongfar from the foundationseek ye now the only oneand you'll find true salvation ... yeaamen (let me hear u say)amen (let me hear u say)amen, amen, amen! (let me hear you now)selah (let me hear u sing)selah (let me hear u say)selah, selah, selah![instrumental] - 8 measureshe who has eyes then let them seefullfilment of prophesyhearts of the bad threaten sweep of the victoryand i know it's not to behe who has ears then let him hearrisin' up the kingdom is very nearwhat a man sow when he sow shall he reapthat's why i give jah my soul to keep it ... yea[chorus x2 + fade]
The song feels like 85bpm (though I didn't really test it). It is reggae style, perhaps more contemporary than most (especially on the bass). The artists (we think there's two because of the seemingly different accents and tones of voice) flow perfectly. Theologically, the message is biblically correct (based on excerpts from the books of Revelation and Matthew).
The word Selah is an old Hebrew word whose meaning is well explained on this website.