ajax Beginnings (ASP.net)

8 Jun

For all of you loyal Microsoft .Net folks… I felt it was important to make a quick note about the earlier ajax Beginnings post. First and foremost, I understand that ASP.net can use the AJAX-Enabled Web Site template that puts the ScriptManager control on your form, and that the key to ajax done this way is using the UpdatePanel control. However, the earlier article can be used and applied using ASP.net if you choose (as long as classic asp is supported by Microsoft).

I will be adding additional .net specific articled in the future. With these articles I will help distinguish some of the different techniques that PHP programmers may employ versus the techniques that a .net programmer may employ.

All in all, the concepts behind using ajax with either development platform are very similar and based on the same things.

Tags: , , , , , ,

ajax Beginnings

1 Jun

I just completed a tutorial at http://www.tizag.com/ajaxTutorial/ in order to get a quick look at ajax…

The tutorial goes fairly fast and gives you the basic understanding of how ajax works. Overall ajax in itself is fairly simple. I would recommend going to the 3w site for the specification.

In general there are only a few key steps to use basic ajax:

  • Create the Object for the browser to use
  • Most browsers:

      ajaxRequest = new XMLHttpRequest();

    IE browsers:

      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

    OR

      ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

  • Create a listener function for the state change
  • ajaxRequest.onreadystatechange = function(){ . . . }

  • Open and Send the request to your server side code
  • ajaxRequest.open("GET", "serverTime.php", true);
    ajaxRequest.send(null);

PHP Beginnings

1 Jun

Once you have PHP installed and setup to run with you web server you can begin coding PHP. PHP reminds me a lot of other scripting languages, mostly javascript with a C syntax flair. PHP is designed to run server-side and serve up the page that was described in your PHP/HTML. This is much like Win-Forms for Microsoft developers.

I managed to go through the rather lengthy tutorial at http://www.tizag.com/phpT/. The tutorial was a good introduction to the language and went into some basic programming concepts as well. I was still hankering to apply the newly learned language, so I decided to work through the example, as well.

The example had a few deprecated pieces of code, that was easily addressed by Googling the deprecated value. I spent a little time adding session and cookies to see how they were working on the server and in the browser. Then I took advantage of Macromedia Dreamweaver’s IDE to look through the various functions that were available to me, and coded up the ones that I thought were interesting. Macromedia Dreamweaver worked well for the PHP development.

I am off to take a look at AJAX for now…

Tags: , , ,

Security and Regular Expressions — A Good article by Bryan Sullivan, MSDN magazine (May 2010)

1 Jun

I just read an interesting article concerning Regular Expressions and how they can be exploited as a denial of service attack. This is definitely a must read for anyone developing web apps which user RegEx.

http://msdn.microsoft.com/en-us/magazine/ff646973.aspx

Tags: , , , , ,

Flash Beginnings

20 May

I have started this voyage by using the Flash Tutorial at:

http://www.tizag.com/flashTutorial/

The tutorial was very basic.  It was well arranged, which allowed a newbie (like ME) to get started using Flash.  Overall, the material was good.  On occasion, key bits of detail seemed to be missing.  However, each lesson built upon the previous lessons to get you to a basic understanding of the key features used in Flash.

I will be looking to find more intermediate to advanced tutorials in order to continue to build my knowledge.   For now… I am moving on to PHP (recursive acronym for PHP: Hypertext Preprocessor), and will install the Windows Binaries, in hopes of combining Flash and PHP.

The binaries can be found here: http://www.php.net/downloads.php

The documentation for PHP can be found here: http://www.php.net/download-docs.php

Tags: , , ,

My Voyage to learn FLASH

16 May

As a developer, analyst, project manager, as well as other titles over my 15+ years in Information Technology, I have never taken the time until now to learn FLASH. In this series of articles I will jot down the steps that I am taking to learn FLASH. Not knowing where this will lead, I will comment on what worked and what didn’t. Hopefully this information will be of benefit to others and will serve as a reference for myself.

Tags: , , ,

Regular Expressions

24 May

Below are some basic and more complexed standard expressions that I like to use in my interfaces.  Feel free to comment with your versions and why you prefer your version over another standard expression.

Phone number formats:
Allows formated or unformated area code required US phone number
(((\(\d{3}\)(\s)?)|((\d{3})(\s|\-)?))?(\d{3}(\s|-)?\d{4}))

Single Initial:
[a-zA-Z]{1}

State Code Text:
[a-zA-Z]{2}

Zip Text one text box:
\d{5}((-|\s)(\d{4}))?

Zip Text two text box:
box1: [0-9]{5}
box2: [0-9]{4}

Date MM/DD/YYYY
Basic: [0-9]{1,2}/[0-9]{1,2}/[0-9]{4}
US Most:  [0-9]{1,2}(/|\-|\.)[0-9]{1,2}(/|\-|\.)[0-9]{4}

US Tax ID 
SSN: (\d{3}-\d{2}-\d{4}|[0-9]{9})
SSN or TIN: (\d{3}-\d{2}-\d{4}|[0-9]{9}) | (\d{2}-\d{7}|[0-9]{9})

Email Address
^(([\w-]+)@([\w-]+\.)+[A-Za-z]{2,3})$

Tags: , , , ,

Follow

Get every new post delivered to your Inbox.