Procedural Epistemology Thinker RSS 2.0
 Tuesday, February 26, 2008

Sorry don't have much time for a longer blog right now, but wanted to throw something out there. This person created a nice little Google Cheat Sheet that if you haven't seen yet, is pretty nifty. The link for it is here: http://junkinfo.us

Quick picture:

Tuesday, February 26, 2008 5:07:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Technical
 Monday, February 11, 2008

Even though ScottGu and others have written about ASP.NET MVC I figured I’d add a series of notations about URL Routing, Controllers and Controller Actions, Rendering Helpers and Understanding the Model.

Who knows maybe the way I explain it will drive the point home.

Part 1 is just my overview of the ASP.NET MVC Framework

ASP.NET MVC Framework (Part 2): Understanding URL Routing

Background

WebForms

In ASP.NET Forms we used Server controls that must appear between a <form> tag. Each server control had to use a runat=”server” attribute to tell the server to process that form on the server.

ViewState

In classic ASP when forms were submitted all form values were cleared. Unfortunately if the form had an error then you lost all that information you submitted. In ASP.NET the form is able to return with all the form values.  ViewState is a way for the server to know the status of the page.

                Event Driven Programming

ASP.NET objects (server controls) on the webpage exposed events that allowed a programmer to process ASP.NET code. By having a Load, Click or Change event handled by code made coding much simpler and much better organized.

                ASP.NET 2.0

In ASP.NET 2.0 we received Master Pages, Themes and Web Parts, more server controls for navigation or security. The provider patterns for Roles, personalization or memberships, etc .

MVC Execution Process

With ASP.NET MVC Framework a web request now passes to an UrlRoutingModule object (HTTP module) which is then parses and a route is selected. Then an MvcHandler take the object and selects a controller instance that will call that controllers Execute method.

 

Stages of the Mvc Web Project

 Initial request

 In Global.asax file, routes are added to the RouteTable object

 Routing

 The UrlRoutingModule creates the RouteData object. RouteData is used to determine which controller to request and which action to invoke

 Map to Controller

 The MvcRouteHandler handler attempts to create the type name for the controller, based on data in the RouteData instance

 Invoke ControllerBuilder   

 The handler calls the global static CreateController method of the ControllerBuilder class, obtaining an IController instance.

 Create Controller

 The ControllerBuilder instance creates a new controller directly, or uses a IControllerFactory object to create the controller

 Execute Controller

The MvcHandler instance is added to the context and calls the controller’s Execute method.

 

 

 So instead of Event Handlers we now have Controller Classes and instead of ViewState exposing certain sequences of events for programming, we now have full control over the behavior of an application.

 

Default Naming Conventions

 Pretty simple, if you have a controller name it UrlPathController  this is so the UrlRoutingModule and MvcHandler can determine which controllers to invoke. Any controller class has to implement the System.Web.MVC.IController. By implementing this IController you will gain access to using the [ControllerAction] Attribute, which we’ll get into next writing.

 

Mapping URLs to the Controllers

        MVC Framework has a default URL convention it follows to map URL’s. The syntax is:

                     URL = [Controller] / [Action] / [id]


      This means your URLs will look like: 

http://domain/site/controller-name/action-method-name/parameters

   NOTE: If you see a controller-name.mvc this is required for anybody running IIS 6.0 as their web server

Global.asax

This file is used to define route mappings. You do this in the Application_Start event. The syntax is:

      // Note: Change Url= to Url="[controller].mvc/[action]/[id]"

      // to enable automatic support on IIS 6.0.

 

      RouteTable.Routes.Add(new Route

      {

        Url = "[controller]/[action]/[id]",

        Defaults = new { action = "Index", id = (string)null },

        RouteHandler = typeof(MvcRouteHandler)

      });

 

      RouteTable.Routes.Add(new Route

          {

            Url = "Default.aspx",

            Defaults = new { controller = "Home", action = "Index",

                id = (string)null },

            RouteHandler = typeof(MvcRouteHandler)

          });

 

This is saying Add a route to the RouteTable which lists my controller and action. Notice you are not required to give it a parameter or id initially.

Here are some example URLs to drive the point home:

URL   

 RouteData object values

 /domain/site/blog 

 Controller=”blog”, Action=”index”, id=null

 /domain/site/blog/ShowEntry

 Controller=”blog”, Action=”ShowEntry”, id=null

 /domain/site/blog/ShowEntry/20

 Controller=”blog”, Action=”ShowEntry”, id=”123”

Next blog we’ll get into the Controllers and Controllers Actions.

Monday, February 11, 2008 10:52:29 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
MVC | Technical
 Monday, January 28, 2008

Hooray to MS Press who has put together a Free E-Book that includes excerpts from these 3 books.

The free e-book includes content from three recent publications from Microsoft Press:

Introducing Microsoft LINQ by Paolo Pialorsi and Marco Russo (ISBN: 9780735623910)
This practical guide covers Language Integrated Query (LINQ) syntax fundamentals, LINQ to ADO.NET, and LINQ to XML. The e-book includes the entire contents of this printed book!

Introducing Microsoft ASP.NET AJAX by Dino Esposito (ISBN: 9780735624139)
Learn about the February 2007 release of ASP.NET AJAX Extensions 1.0, including an overview and the control toolkit.

Introducing Microsoft Silverlight 1.0 by Laurence Moroney (ISBN: 9780735625396)
Learn how to use Silverlight to simplify the way you implement compelling user experiences for the Web. Discover how to support an object-oriented program model with JavaScript.

I haven't read it yet, but it's free so no complaining.

Learn more about it here.

Monday, January 28, 2008 10:05:55 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
AJAX | LINQ | Silverlight | Technical
 Monday, January 21, 2008
Although this isn't techincal. I have to show it off anyway.

My buddy from college made me and my wife this painting. Its called "Misty Lake"




The artist name is "Scot Vorwaller" If interested you can find his artist blog here: http://vorwaller.blogspot.com/ He gives a very fair price for his paintings.
Monday, January 21, 2008 2:18:23 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback

 Friday, January 11, 2008

I feel that I would have to break down each Technology and pit them against each other, so here is how I will begin.

 

ASP.NET/C# VS Zend/PHP

 

1.       ASP.NET has the .NET Framework while PHP has nothing like it.

a.       .NET Framework has Two main parts:

                                                               i.      Common Language Runtime(CLR): The CLR can run code written in any language that’s adapted to .NET (VB.NET, J# and C#) it can run on any operating system that has a version of the CLR. Like Java that doesn’t have to be written in Java.

                                                             ii.      A hierarchical set of class libraries (Think PHP functions + the PEAR libraries and it extends them a lot, and have them organized in a nicer hierarchical structure). Included in those class libraries are ASP.NET (templating system), ADO.NET (a data access system), Windows Forms (classes for building windows apps), XML/XSLT frameworks (Code Generation), WCF (Built-in Web Services), Expression Framework Classes (Designer Framework), WF (Workflow Framework)

b.      ASP.NET uses a templating system on steroids called Web Forms which uses its runat=”server” attribute which gives you server side controls. Which run on the server giving you many more events, more possibility and more security. There is DaDaBIK but it doesn’t come anywhere close.

 

Performance Tests

 

c.       This person used the .NET Framework in C# Mono, but they are the same.
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=csharp&lang2=php

  

2.       Speed

a.       .NET languages are static typed meaning they are compiled into assemblies making them 2/3 time faster than PHP, whose applications are interpreted. To achieve the same effect with PHP, Zend and PHP accelerator must be installed on the server. I’ve done this and ran performance tests and ASP.NET is still faster by a large margin. Also OOP is much faster in ASP.NET than it is in PHP.

b.      For Performance Speeds on C#: http://dada.perl.it/shootout/csharp.html

c.       For PHP: http://dada.perl.it/shootout/php.html

d.       

 

3.       More Language Support

a.       ASP.NET is written using "real" OO (Object Oriented) programming languages of your choice. PHP is just a simple scripting language in comparison to .NET languages like C++, VB.NET or C#.

 

4.       Much better Development Environment

a.       Visual Studio has multiple Integrated Development Environements (IDE’s) for the different roles you play in development (Database Admin, Tester, Developer, Project Manager, Business Analyst). Just a few of the things you can do:

                                                               i.      Automatically create reports and diagrams from your database

                                                             ii.      Debug the code line by line, while at the same time seeing what happens in the application as well as typing in a command window a variable and seeing what the results of that variable is, or calling a function in the command window.

                                                            iii.      Assign temporary value to variables in the middle of execution, in order to test out different scenarios.

                                                           iv.      Hover the cursor over variables in your code while debugging, to see what value they have “right now”

5.       It’s Part of .NET

a.       ASP.NET is a part of .NET, and that benefit is too large to simply ignore. If you know how to write ASP.NET applications, you know how to write ordinary applications too. Even windows apps, if you read up a little on the Windows Forms classes (as opposed to the Web Forms). PHP has PHP-GTK, but it's currently very immature compared to .NET.

 

6.       Reusable Codebase from Performance Pro 2

a.       If there is anything we want to use from Performance Pro 2 that we don’t really need to change, we have only to add the .asp file or files wrap it up in a COM Component and ASP.NET can access it and use it as if the code was already written. We can’t wrap the original codebase in PHP without rewriting it.

 

7.       At this point it’s cheaper

a.       We have the licenses for all the server software, the hardware for at least half of everything we need as well as the developers of strong skill sets already in house. We spend a lot of money already towards consultants for .NET and put a lot of effort into designing Performance Pro 3 for ASP.NET. If we go the other route we need to hire more experts, other developers, new hardware, new software. Most companies move from MySQL to Oracle as they grow and Oracle is very expensive.

 

Most PHP developers end up just justifying themselves by stating well I’m capable of building this feature or that feature. It’s a programming language of course you can build it. They also state there is this and that company that does it. But that costs more money, while these things are built into .NET. The difference is in productivity, we move to market faster, and the application performs better using the right technologies.

 

Here’s another link to Benefits of .NET Framework that I’m not even listing:

 

http://www.tometasoftware.com/benefits_of_net.asp

 

 

MSSQL VS MySQL (7 Reasons to Use SQL Server)

 

1.       Full Server Side Integration

a.       Full server side integration with the .NET Framework (LINQ to SQL , LINQ to XML)

2.       SQL Server has much much more advanced features over MySQL

a.       SQL Server just flat out has more advanced features then MySQL. SQL Server is a Sybased-derived Engine and Microsoft has just focused on using and expanding that infrastructure. MySQL is an open storage engine which uses InnoDb, BerkleyDB, MyISAM and Heap. Which they have struggled with design because of these multiple choices.

3.       XML is a native type within SQL Server

a.       Allows a DBA to modify an XML doc within the DBMS environment, query the document and validate it against XML schemas without having to DB Program it.

4.       Cheaper

a.       We are already have a SQL Server 2005 Enterprise Edition x86. Bought and purchased. MySQL AB would us more money.

 

5.       Security

a.       SQL Server 2005 has been certified as C-2 compliant and fully supports security at the column level. It also supports native encryption and obfuscat’s(intentionally, very hard to read and understand) the DBA from writing user-defined functions using column encryption APIs. A DBA also has the choice of specifying his own user-defined security functions through the encryption facility implemented in the .NET Framework

b.       MySQL has basic security at the table level and has no such certifications.

 

6.       Recovery

a.       SQL Server is more failsafe and less prone to data corruption. They have robust  checkpoint mechanisms, enhanced data protection, rapid restorations, Mirrored backups and partial backups instead of sorting through entire full backups.

b.      MySQL falls short with a default MyISAM mechanism. The UPS assumes uninterrupted data, and in the event of an unexpected shutdown your data can be lost and the data store corrupted.

7.       Most move to SQL Server or Oracle anyway

a.       Through my experience most move away from MySQL anyway because it just doesn’t meet the demands of today’s very rich artifacts of data. Such as (Media, Pictures, Audio, XML etc)

 

 

This would be considered a persuasive argument for those of you that take the critical thinking or english classes that teach it. ^_^

Friday, January 11, 2008 4:41:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] - Trackback
Architecture | Business | NET 3.5 | Technical | Article
 Wednesday, January 02, 2008

The Microsoft Patterns & Practices team in May 2007 has released the Enterprise Library 3.1. The Enterprise Library is a collection of application blocks. These are reusable software components designed to help a developer with the common development challenges you face between projects you work on.  This release of the Enterprise Library includes two new application blocks, a software factory for creating application blocks and providers, and other new features and enhancements.

Benefits

The Application blocks help address the common tasks we do every project. Caching, Validation, Data Access, Factories, etc. Microsoft has encapsulated these best practices for .NET applications into the Enterprise Library so that they can be added to your projects quickly and easily. 

Goals

The goals of the Enterprise Library are the following:

  • Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.
  • Extensibility. All application blocks include defined extensibility points that allow developers to customize the behavior of the application blocks by adding their own code.
  • Ease of use. Enterprise Library offers numerous usability improvements, including a graphical configuration tool, a simpler installation procedure, and clearer and more complete documentation and samples.
  • Integration. Enterprise Library application blocks are designed to work well together and are tested to make sure that they do. It is also possible to use the application blocks individually.

I'll update this with more as I learn more.

You can find it here:

http://www.codeplex.com/entlib

Wednesday, January 02, 2008 7:18:39 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Architecture
 Wednesday, December 26, 2007

Internet Explorer has cool add-ons which make the job of website designers and developers much easier. Here is my list of 20+ excellent IE  add-ons that every web developer and designer should know about.


Internet Explorer Developer Toolbar
 Variety of tools for quickly creating, understanding, and troubleshooting Web pages.

IE Watch
Allows you to view and analyze HTTP/HTTPS headers, Cookies, GET queries and POST data.

IE Web Developer
Allows you to inspect and edit the live HTML DOM, evaluate expressions and display error messages, explore source code of Web page and monitor DHTML Event and HTTP Traffic.

IESpy
Allows one to inspect or manipulate the DOM of any IE Web browser control.

DebugBar
Brings new services to surfers and professionals. Surfers: zoom, direct Web search, e-mail page screenshots, and color picker. Developers: view HTML code, cookies, JavaScript, HTTP/HTTPS headers, and miscellaneous information.

Virtual Machine
Allows you to view java applets on Web pages.

Microsoft Fiddler
Logs all HTTP traffic between your computer and the Internet.

Tangram Xtml Designer
Visual designer for IE Band Object, activeX Control and .NET user control.

Http Watch
 HttpWatch shows you HTTP and HTTPS traffic from within IE allowing you to quickly debug, fix and optimize your Web site.

Embedded Web Browser
The package contains all the programmer need to extend the development of a Web browser.

CGToolbar
Must have tool for CG Artists, Animators, VFX and 3d professionals.

Site Studio 6
Build rich content Web sites, with no HTML skills required.

Haptek Player
 An ActiveX control and Netscape Navigator Plugin that allows any webpage or application (with ActiveX support) to include Haptek’s Autonomous characters.

Flash2X Flash Hunter

Save Flash movies from web pages.

iOpus iMacros
Check the same sites every day,data upload, online marketing and functional testing and regression testing Web sites:

Telerik RadToolBar
A flexible component for implementation of tool and button strips, needed in most web applications.

UltraEdit-32
Powerful Text, HEX, HTML, PHP and Programmer’s Editor.

Bytescout Post2Blog
 Freeware powerful blog editor for WordPress, Typepad, MovableType and other blogs.

Search Monster
Free Flash Web Directory & Internet Search Engine is the Flash-remoting Web directory instant content for you Web site.

Zend Studio
Encompasses all the development components necessary for the full PHP application.

DbaBar
Integrated toolbar enabling Oracle Database Administrators to browse their databases from within Internet Explorer within minutes after installation.

Explorer Toolbar Maker
lets you create your own Explorer bar from any HTML page, picture, Macromedia Flash file, or Microsoft Office document.

Wednesday, December 26, 2007 8:58:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Internet Explorer
 Friday, December 21, 2007
Scott Hanselman release links to the .NET 3.5 Extensions in action. I just want to say the Dynamic Data Website is AWESOME!.

http://www.hanselman.com/blog/HowToNewASPNET35ExtensionsVideoScreencasts.aspx

Friday, December 21, 2007 5:45:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
NET 3.5
Archive
<February 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
2425262728291
2345678
Blogroll