Archive for April, 2009

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

previous1next1The Professional Developer Series
Volume 2, Web Development

Chapter TBD

Page: TBD

A bit more about firefox, while in many cases the browser is exclusivly the best way of getting web development done it does have its own set of issues; particularly in utilization of computer memory.

firefox-overview-memory-utilization

I have seen firefox memory utilization start off at a feeble 20,000k, and grow to well over 1.5gb at times. Now, just so you know not all of this is completely attributed to issues with firefox its’ self. Memory leaks in websites’ applications, and firefox having a multi-tab environment greatly contributes to browser memory utilization overhead.

Extensions, are another HUGE factor when talking about how much memory the browser will use. To give you an idea, lets assume that 3 website tabs are each consuming 15,000k (a total of 45,000k). Next lets open a firebug extension and say it consumed an extra 5,000k per tab. That would spike the total memory useage to 60,000k.

Finally, lets add in 5 other extensions that also consume 5,000k (thats an extra 75,000k), you can see how extensions start to greatly contribute to the memory overhead of firefox. Sadly if you factor in leaks, and other issues. Memory starts to add up rapidly, so what can we do about it?

Option 1: Disable Extensions When Not In Use
One solution would be to only enable the extensions when doing development. Start off by opening the add-ons window again (page 16), but this time click on the extensions button in the window (the thing that looks like a puzzle peice).firefox-overview-extensions

Simply click on the “Disable” button to disable the extension when you do not need to use it, firefox will prompt you to restart and after you do the extension will not be available to the browser again until you re-enable it. To re-enable the extension simply go to the same configuration area and click “Enable” for the plugins you wish to use.

While this method works perfectly, part of an annoyance is having to click through and enable/disable several extensions when all you really want is a light-weight version of firefox without those plugins. That is where option 2 comes in.

Option 2: Set Up A “Light Weight” Firefox Profile
The idea of setting up a light-weight firefox profile is nothing spectacular, but it will for-sure take care of extension memory issues all in one shot. So lets get started, first off I have found a neat little firefox extension to make the job more easy called “profile switcher”, https://nic-nac-project.org/~kaosmos/index-en.html#profname lets go out to the website and right-click on the “Download” link choosing “save link as”.
firefox-overview-download-profile-switcher
Save it to a location on your computer where ever that may be. Next lets install the extension, in firefox choose [File > Open File], and select the extension that was just saved to your computer.
firefox-overview-install-profile-switcher-extension
The browser will popup the familiar extension install window (page 16), install the extension and re-start the browser. Once the browser is re-started, you should see a blue icon on the bottom of the browser saying “default”. This is the profile switcher.
firefox-overview-profile-switcher-icon

What are profiles in firefox? You can think of profiles almost as a way of defining different versions of the same browser. Its actually intended for situations such as multi-user environments, example: lets say that bill, judy, and jane all are using the same computer. Bill wants to have his own set of bookmarks, judy also wants her own set, and jane doesn’t use bookmarks at all. Profiles would allow bill to create a profile named say “firefox-bill” within the browser which would save all his bookmarks to firefox-bill if he was using it.

We will be using profiles in a little different way, currently the profile is set to “default” and is pretty heavy with all these extensions, so lets simply create a “firefox-lite” profile which contains NO extensions! Lets start off by right clicking on default, and click on “Open Profile Manager”.
firefox-overview-profile-open-profile-manager
You will probably get a pop-up asking you “Close current profile when switching?”, choose “No”. Next the “Firefox Choose User Profile” window will pop-up.  Click on the “Create Profile” button.
firefox-overview-profile-switcher
A window will pop-up describing what creating a profile does, click next. The next window that you will see will ask you for a profile name type “firefox-lite”, and click the finish button.
firefox-overview-profile-firefox-lite-create
You should now see firefox-lite in the profile chooser, double click on it and a new version of firefox should start right up with no extensions installed! This functionality should allow you to create tailored custome firefox environments based on the type of development you are doing. Are you doing SEO? Great, install all the SEO extensions you want, and simply create a firefox-SEO profile, etc.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

previous1next1The Professional Developer Series
Volume 2, Web Development

Chapter TBD

Page: #TBD

Throughout the book we will be covering web development tools which are common and well known by software engineers around the world. Before we are able to get to that, I will need to familiarize you with some of the technology platforms which we will be developing with.

So lets start off with Mozillas’ Firefox. Firefox; a well known internet browser is used every day by many. What people may not be aware of is the powerful web development tools available for the browser, making it one of the most popular web development platforms available today. So lets get you up and running.

If you do not already have it, you will need to go out and download firefox at http://www.firefox.com, next you will need to install it (if you need help installing firefox check out this video (windows users)). So lets install some extensions for the browser that will be the basis for the development environment.

How to install a firefox extension:


  1. Start up the browsers and click on [Tools > Add-ons].
    firefox-overview-tools-addons
  2. Next firefox should pop-up a window (Add-ons); you should see a text field stating “Search All Add-ons”, click on the text field and type in “web developer toolbar” and press the enter key.
    firefox-overview-addons-web-developer-toolbar
  3. You will notice that firefox returned back a result of “web developer”, this is one of the tools that you will be needing so click on the “Add To Firefox” button. Firefox will then pop-up a window asking you if you would like to install the plugin, click on the “Install Now” button to install it.
    firefox-overview-install-now
  4. Next the browser should return you back to the original window, and ask you to restart firefox. DO NOT RESTART IT for now! Lets first get the rest of the plugins installed. Please repeat steps 2 through 4, and install the rest of the required firefox plugins as listed below, feel free to restart firefox afterwards.



How To Install Bookmarklets:


Bookmarklets are little javascript applications which we are able to execute on any page the browser is currently displaying. Installing bookmarklets is very easy in the case of firefox (a bit harder for internet explorer). Anyway, lets install a bookmarklet which we will be needing in the future (Javascript Shell).

  1. Open up firefox and lets go out and visit http://www.squarefree.com/shell/, next lets click on the link “get the Shell bookmarklet (Firefox only)” which will bring you to a page with a list of tools.firefox-overview-bookmarklets-shell-page
  2. You will notice the first button in the list says “shell”, this is the software you will be needing. So next right click on the shell button and click on “Bookmark This Link”.
    firefox-overview-bookmarklets-bookmark-this-link
  3. Firefox will pop-up a window for naming the bookmark you are saving, I am just going to leave the name the same but feel free to change it if you want. When you are ready click on the “Done” button, and thats it!
    firefox-overview-bookmarklets-add1
  4. Now if you would like to execute the shell to confirm that it is working, simply go to the bookmarks toolbar and click on the newly added bookmark.
    firefox-overview-bookmarklets-execute
  5. Perfect, you should see a window pop-up similar to the one below.
    firefox-overview-bookmarklets-js-shell
  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

JSON and Webapplications

Author: mprokes

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

previous1next1The Professional Developer Series
Volume 2, Web Development

Chapter 1.3 Web Development Today

Page: #15

So we have mentioned JSON a little bit here and there, but so far I haven’t made any clear indication of what it is. JSON or JavaScript Object Notation for all intensive purposes is just another alternative way of structuring data for transmission through the network. The core objective of JSON is similar to XML, and is particularly well suited for webapplications. Less bulky data transmission, direct conversion into javascript objects, various transmission techniques, and cross-domain data communication are just some of the advantages of JSON.  Later, this book will show you how to create web/desktop application hybrids, JSON is the only technology that would allow such functionality.

So what is JSON really? Without teaching you the language (that will come later), you can for now just think of it as data wrapped in javascript based constructs. It really is just javascript, nothing to magical. The neat thing is several server libraries (for various langauges) have been written to generate and read javascript code in accordance with a recognized standard. So rather then having your webapplication passing around xml data, it may simply pass around JSON data instead. Finally; JSON does not make xml by any means obsolete, you still need xml for things like the W3C Specs (RSS, SOAP,XSLT, XHTML, SVG, etc) it is also often used as a “reference dataset” in high traffic systems as shown below.

An Advanced Content Distribution System, Using XML As The Reference Dataset

xml-transformers1

XML is still nessesary for most web development today, so really it is all about the best tool for the job when deciding what to use and why. This book will make that decision clear later on, but for now I am just making you aware whats out there. So where can we find out more about json? Well this book will go over some of the basics related to webapplication development. In the short term, if you are looking to develop backend systems which will deliver JSON data; Douglas Crockford’s JSON Website has libraries for just about every langauge out there. Mr. Crockford, is well known for introducing JSON, as well as being a lead senior architect for Yahoo.

Finally: What we will not go over, is the creation of JSON data by a server. That will most likely be handled by another book in the future.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

What Is A Server?

Author: mprokes

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

previous1next1The Professional Developer Series
Volume 2, Web Development

Chapter 1.3 Web Development Today

Page: #12

A server can actually be many things, but the primary purpose of a server is to serve (or transmit) data, or data service(s). The more common definition of a server would be a software package that is available on a computer, which would transmit data through a network. There are several different kinds of servers, and several different ways of using them. So lets go through a few common ones.

  • Web Servers: Transmit web content and data via a http GET and POST requests (i’ll explain later). Web Servers usually are only able to transmit static files. Webserver content is most often viewed by clients which understand html, and other web technologies such as web browsers.
  • Application Web Servers, can deliver either be dynamic or non-dynamic content by leveraging server based programming languages which are able to deliver dynamic data to a web client.
    • Difference Between: Application Servers, and Web Servers? Not a whole lot! The only real difference is what a server can actually do, for instance the functionality which makes application servers unique is the ability to return dynamic sets of data and content back to a web client. All servers transmit the same type of content to web based clients, regardless if they are an application server or not.
    • Application servers generally have many (but not always all) of these unique properties:
      • A type of deployment environment.
      • Very basic authentication services.
      • Come pre-packaged with frameworks.
      • Contain database management systems.
      • Associated with a language for dynamic processing of data.
      • Application servers focus on serving dynamic data, thus facilities are more focused on satisfying business logic, and data requests. Webservers are more or less “generic” and use agnostic.
      • Application servers contain facilities to package up, and execute business logic.
      • Contain unique webservice facilities, specifically:  binary/bytecode object transmission systems for third party plugins, or platform specific technologies.

      Today, application servers are the only way of delivering dynamic binary data over the internet leveraging (CORBA, RPC, and other non-XML data transmission technologies), though these technologies are not used as much as they once were. What happend was when xml came out, it offered a platform agnostic way of transmitting data through the internet, unlike many of the plarform specific standards. Thus allowing any platform that understood xml to be able to send and recieve data through the internet.

  • Database Server: Is simply software which provides access to a database through a network. Database servers are often bundled with the actual database which they service. The primary function of database servers today is to accept SQL based “queries” (requests), and retrieve/store data, images, text. There are several different kinds of databases, but that is a discussion for a different book.
  • File/FTP Server: Is a server which delivers files through a network. There are several different kinds of file servers, including P2P, Torrent, etc.. The most popular on the web today (and also the oldest) is a FTP Server or File Transfer Protocol. This protocol is built into almost every web browser available. So if you ever need to distribute a file FTP is the way to go. As a side note, most browsers these days also support HTTP based transfers; meaning if you have a file, you can just put it out on the webserver and as long as it is not a format that the browser knows of it will download it.
  • Proxy Server: Is a “proxy” representative of a real one. It is generally the job of a proxy server to forward requests made to it from another computer, and then return the results from that request back to the request(or). Proxys are also sometimes used in filtering, and they are an essential part of routing technology.
  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Im Back

Author: mprokes

Hello, I am back and ready to get going again, I took a bit of time the last few days looking through other books on various aspects of web development, and created a index on things to write about. I probably have enough content for the first 1000 pages, so im ready to get going again!

Unfortunately though the first 1,000 pages won’t include javascript since this will be a comprehensive book on all of web development I expect at the end of the day the book to be about 3,000 -> 4,000 pages. That does include a lot of content though that you would not find in other books. Including videos, interactive tutorials and more! I can justify a book that large since it will be completely search-able.

Also I wanted to toss out a few ideas on how I will actually be capitalizing on this book. Here is what I will be doing.

  • I plan on leasing out sections of the book with a bi-yearly agreement, allowing people to place advertisements on the book.
  • I plan on offering up educational packages, some of these packages will include:
    • Distribution of a particular volume on cdrom, along with extra content included in that distribution such that a book can be handed out to the classroom.
    • Many packages will include voice and video conferencing with the author/and or editor (depending on package grade)! Meaning that the people that actually wrote the book will sit down with your class for an hour or two, and discuss various topics on the book.
    • A location on the blog specifically for answering questions, and helping your class move forward.
    • The “Teacher” cd will include quizes, and powerpoint content for lecture.
    • Educational packages will vary, some of them offer more hours with the author/editor in exchange for no cdrom, and others offer less hours with a cdrom, others offer both.
    • Create group driven projects, which maximize success.
  • I would like to do a paper publication of this book once it has been refined enough to justify a paper publishing.
  • I plan on helping people who edit this book make money through the educational program.

Thoughts?

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

What Is Parsing?

Author: mprokes

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

next1previous1The Professional Developer Series
Volume 2, Web Development

Chapter 1.3 Web Development Today

Page: #13


What does it mean to parse something?

The term parse will be used frequently throughout this book. So lets just give a quick run through of parsing, and why it is necessary in web development today. As wikipedia states, parsing is the action of analysis.

We as humans parse things every day, for instance you as a reader are able to parse (or read) the english language. As a result, a reader is able to store data, and learn things from reading. Computers are no different, they are also able to read as well (in this case xml) through their programming, and then take that data that has been processed, and do something useful with it (what ever that may be).

The action of processing and understanding data which a computer receives, and doing something useful with it is the definition of parsing. The XML language is already parsed by many many languages, so the hard part is done. Once xml is parsed though, the computer still does need instructions on what to do with that data.  So even though xml date may have been parsed and is readily available, that doesn’t mean that the computer knows what to do with that data yet.

The action of reading data is part of the parsing process called “processing data”, or “analyzing data”; and since most of today’s applications are driven by data, they do a ton of this. During the processing stage of parsing the computer may build a “representation” of the data in its own language, this is called a “data model”.

The computer may also decide to take action or “execute” on some of the data it finds while processing. All this is determined by the programmer, and many programmers make a good career out of just writing parsers to help computers understand all the different languages out there.

There are several different ways of parsing data; summarizing, there are techniques like pattern matching (Regular Expressions) as well as more recently matching hierarchical features (XPath), and many of the API’s out there designed to parse things like XML. Some are a combination of both (Antlr), regardless parsing will be a fundamental part of your career. You need it for things like validating data, and reading data which you receive; so if you have a bit of time, I suggest learning Regular Expressions or XPath.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Bit of writers block

Author: mprokes

Well I hadn’t posted a page today, and most of the reason is that the last few pages I noticed a bit of writers block. After reading a few good tutorials on writing books it was made clear to me that my outline wasn’t nearly detailed enough, so I was losing sight of what to write about.. As a result I spent tonight looking through some good past books on web development, and then wrote a much more detailed outline as far as what to talk about in each chapter and section.  Hopefully this will help me overcome some of those issues, as well as making sure I stay on track myself with each subsection. I have so much to say, and so many new ideas to introduce in this book that I lose sight sometimes in the excitement, and then after a couple of pages I really get off track from the original intent of the section. Anyway just giving an update.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

next1previous1The Professional Developer Series
Volume 2, Web Development

Chapter 1.3 Web Development Today

Page: #14


As mentioned earlier, one of the more important roles of xml is describing data, this is useful because often xml is leveraged to transport data across the internet. There are a few ways in which transportation of XML data across the network occurs.

Xml, and webservices are synonymous when speaking in terms of delivering data content out on the internet.

AJAX, Asynchronous JavaScript and XML

page12ex12

Ajax, defines the delivery of xml data to a client browser via a webservice request. Request data can include xml being sent to the server for parsing or can be things like parameter values in a GET or POST request. The data returned from a server is usually XML or JSON (more on json later). Ajax may also be used to get non-dynamic xml data.

B2B Webservice

page12ex24

B2B Webservices define the delivery of xml data to a server via a webservice request. With webservices, data is dynamically assembled based on the request and sent back for processing.   are able to send messages back and forth to each other, based on their request and the data returned to the request(or) of that webservice.

Data Syndication

page12ex3

Data Syndication is a bit different then the previous two examples, the difference being that in the previous two examples the data was dynamically generated and returned based on what was requested. Syndicated data is static (meaning it doesn’t change dynamically), as a result the data is updated when the publisher of that data decides its time to update it. There is also a semi-dynamic version of this pattern called REST, but we will get to that later.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com

next1previous1The Professional Developer Series
Volume 2, Web Development

Chapter 1.3 Web Development Today

Page: #11


So what is the core foundation of all these modern technologies? What is making the modern web of today tick? Believe it or not SGML is a language nearly 50 years old, and the ancestor of most modern web technologies. Though most modern browsers today no longer understand sgml, they do instead understand a direct subset of the technology, XML. XML, or the eXtensible Markup Language, was intended to be a specification for describing data attributes, classifications, structure and hierarchy.  This meta-language mandates a set of rules for defining the structure of data.

So why is xml so important?  Xml on its own actually does nothing more then describe data, it takes something like a computer application which has been programmed to understand that description for xml to be useful. This means that xml is nothing more then a set of standardized rules for describing a data format. If you break the rules, then xml is not valid, and the data within it cannot be properly read. The great thing is that there are many applications leveraging xml formats, including popular ones such as xhtml, svg, rss, soap, and thousands more. Libraries for every computer programming language available has been written to make reading and writing xml formats easier.

So who defines all these languages? Well since anyone can create a XML format, programmers like you and me do. Though,  important xml standards are written and executed upon by through a standards body known as the w3c. The W3C  is a consortium of companies, and engineers who develop and deliver technology standards which evolve the internet, they are also the architects of xml its’ self.

XML formats, and languages are often defined and written through the organization and presented to the public for implementation. It is then left to interested parties (often web browser developers), to implement those languages on their technologies. If a programmer is able to create an application which follows the w3c standards / definition / description etc…, then that application is said to be ” w3c [insert technology name here] compliant” .

You may have seen these graphics before on other sites; these graphic icons are signifying a sites’ compatibility with a particular w3c standard.

Many well known formats have come from the W3C and will be covered in this book, including XSLT, SVG, XPath, CSS, SOAP, XHTML, RDF and more.

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark

Calling all editors

Author: mprokes

Hello, I am currently attempting to publicly write a series of programming books, and I am looking for a few good people that would review my work as I publish it and offer an editorial review of said work. In return (for frequent editors) I will post your name as the works’ editor on the front cover of the particular series of which you are editing :-) . Anyone interested please e-mail me at mattprokes@gmail.com . Thankx for your help.

Your Friendly Developer

~Matt Prokes

  • Reddit
  • StumbleUpon
  • Bebo
  • Yahoo Buzz
  • Delicious
  • Twitter
  • LiveJournal
  • Netlog
  • HelloTxt
  • Share/Bookmark