Object Oriented JavaScript II: the pattern
Dec 21st
Ok, now that we’ve covered the most basic concepts of JavaScript, we can now proceed to take a look at the pattern itself.
The first feature we need to implement is private and public members. Using closures, this is easy to achieve:
Object Oriented JavaScript I: the basics
Dec 2nd
Today’s web applications are inconceivable without the use of JavaScript. It has become a fundamental part in modern web systems. A lot of time and effort must be put into client-side programming to make our application have that modern look & feel that JavaScript provides and we all like to see.
Until AJAX techniques emerged, JavaScript was not seen as an application development platform. It was treated merely as a scripting language to implement minimal dynamic web page behavior. Up till not too long ago, all the JavaScript I needed to write was just a few lines of code to make some validations, a few animations and some AJAX calls… but this has definitely changed today. The number of JavaScript lines I am writing nowadays for the web apps I’m developing are counted in the thousands. Heck, the last module I developed at work contained more than 12000 lines of JavaScript code! This means that I can no longer just write code without order. I need to have some logic behind the process of writing code. And this is when object oriented techniques come into play.
Are you up to date of the latest trends?
Nov 9th
Are you aware of which browsers are used to visit your latest web application? Did you take that into account when designing it? Are you using the best tools that there are out there to do your job? Certainly, computer technologies evolve pretty fast, and what might have been the best thing last year, might already be obsolete today. If you want to be kept updated of what the latest trends are, you should regularly check these statistics:
Load testing
Oct 21st
There are different kinds of testing any application must have passed before releasing it to the public. We’ve already taken a look at Unit testing and GUI Testing. But another important kind of test you should test your application against is Load testing. Having undertaken and passed these three different kinds of testing will ensure you’ll have a rock-solid application that will meet the highest quality criteria.
Load tests are designed to check how fast a system can perform its tasks under certain work conditions. They also verify some other attributes, like scalability, reliability and an efficient use of resources. These tests can find which parts of the system make the whole application perform worse than expected. If all components of the system are independently monitored (database, web server, etc…), finding the bottleneck of the system won’t be difficult. And just by tuning this part of the application, you’ll make your whole system faster. Doesn’t this sound beautiful?
GUI Testing
Oct 4th
A very important thing you must do before releasing your web application into the wild is some sort of Graphical User Interface Testing. This kind of testing ensures that the interfaces between the client and servers execute in tandem. It is an important factor that these connections or interfaces work seamlessly without any failure or degradation in performance of speed and accuracy. The testing should also check for appropriate error messages. So, you must design these tests not only to check whether your application works as expected, but also to ensure that the performance is good enough.
Unit testing
Aug 3rd
A unit test is a piece of code written with the sole intention of verifying that a routine or function behaves as we’re expecting it to. Unit testing attempts to provide a collection of tests to check every method of the different classes the developed program may contain works flawlessly. The general idea is that, if all the parts of the program work properly independently, it’s highly likely that the program as a whole will function as expected. Of course, after all the unit tests are passed, integration tests must be performed as well to ensure the complete system doesn’t have any unintended behavior.
Improving software quality: automatic testing
Jul 13th
Providing high quality software from early stages in the software project is the key to a successful project. We must check the quality of our software in every single release and make sure it’s meeting our expectations. It’s much easier to code having quality requirements in mind from the very beginning than finishing a module and then fixing all the unexpected behavior afterwards.
There are many tools to improve the quality of our work. Developers have refactoring tools, memory profilers, code coverage, etc. But in a software project we also have testing resources, also known as Quality Assurance. Their job is to test the application and find as many bugs as possible: to achieve a high quality product, thorough testing is a very important step. However, this can be a very tedious and time-consuming task. Fortunately, part of this work can be performed automatically using some tools.
HTML 5 C# Web Sockets server and ASP.NET client implementation
Jun 22nd
In the previous post we saw that Web Sockets are the best invention since sliced bread: they bring to the web the bidirectional full-duplex communication traditional desktop applications have been enjoying for quite some time now. It solves many current problems, and enables much more powerful applications than current standards.
I’ve developed a very basic Web Socket server implementation in C# just as a proof of concept. It handles the most basic operations you would expect from a server: start a new connection, disconnect, and send and receive data. Besides, I’ve developed the client part as well using regular ASP.NET. Actually it’s just plain HTML and JavaScript being served from an ASP.NET server – this example doesn’t use any fancy runat=server controls or anything of the like. The functionality is achieved with very simple and easy to understand JavaScript.
HTML 5 Web Sockets
May 30th
Following the series of posts discussing AJAX calls, today we’ll see what is going to be its evolution: Web Sockets. It’s still a very new technology, and support is starting to be implemented in most major browsers and web servers. But don’t count on using it yet, since most of the clients of your web app will not be able to use them. I’ll discuss web sockets here just so you know what the future is going to bring to the web apps world.
The history: the beginning of AJAX
The world wide web and the Internet started as a stateless content delivery mechanism, taking a step backwards compared to traditional desktop applications. Early Internet applications needed to explicitly request every piece of information, and the server sent only the requested data.
Then came what we now call “Web 2.0 application development”: Dynamic HTML, heavy usage of JavaScript, AJAX, and various plugins (Adobe Flash and Microsoft Silverlight). These applications were dynamic and responsive, and they brought much of that rich interactive experience users enjoyed in desktop client/server applications to the Internet. However, due to the request and response architecture that these applications are based on, the latest Rich Internet Applications still cannot match the connectivity and the capability to get real-time data that client/server applications had more than a decade ago.
AJAX call using ASP.NET Web Services
Apr 27th
We’ve already seen quite a few ways of performing AJAX calls: web pages, HTTP Handlers and Page Methods. Today we’ll see how to request data from the server using ASP.NET Web Services.
Web Services are a very general model for building applications, and can be implemented for any operation system that supports communication over the Internet. A Web Service is some programmable application logic accessible via standard Web protocols. It is often referred to as Web APIs as well, since they are a set of methods that provide some functionality through remote method calls. It is a way of offering some of your functionality to all of the internet. But, of course, some kind of restrictions and security can be built into your web services, if that’s what you wish.

