Wed, 30 October 2013
An algorithm is essentially a well defined set of instructions that get carried out by a computer in an automated fashion to solve a problem. A good example of this is to say "How would you tell a computer to figure out which of the 5 balls I've given to you is the heaviest (or lightest)". In order to solve this "problem", you'll need to define a set of steps for the computer to carry out in order to reach a conclusion and solve the problem. Algorithms are very common in programming, as you are constantly trying to tell the computer how to solve problems in a step by step manner. The Big-O Notation is the way we determine how fast any given algorithm is when put through its paces. Consider this scenario: You are typing a search term into Google like "How to Program with Java" or "Java Video Tutorials", you hit search, and you need to wait about 30 seconds before all of the results are on the screen and ready to go... Would you still use Google? Or would you start shopping around with other search engines to find one that is faster? My guess is you'd start shopping around. Speed is everything these days, and building slow software is infuriating to users even if they aren't even paying for the software. |
Wed, 23 October 2013
Ever wondered how you could properly restrict access to certain parts of your web application? Do you have an application that has a user registration page and a user login page? Spring Security is the answer if you have a web application created with the Spring Framework! Spring Security will restrict access to any URLs that point to your web application based on your custom configuration. Learn how in this week's How to Program with Java podcast. |
Wed, 16 October 2013
So, the Spring framework is a wonderful help for programmers, but sometimes it needs a bit of help. It does a good job of trying to match fields on a webpage to Java objects (aka Java Beans), but sometimes when the "mapping" is complex, Spring needs our help. In this episode I will explain exactly how you can go about something known as "custom binding". This process allows you to take any text from the presentation layer and convert/bind it to the appropriate Java object (Java Bean) on the server side. |
Wed, 9 October 2013
In our last episode I talked about controllers and how they are used in Spring. In this episode I will be diving even further into Controllers in the Spring Framework and I will talk about the different parameters that can be passed into each method within each Controller. For example, there are HttpServletRequest objects, Model objects as well as @RequestParam and @ModelAttribute annotations that can be used within your Controller's methods. The beauty of the Spring framework is that you can pick and choose which ones you want to include within any given method. |