Procedural Epistemology Thinker RSS 2.0
 Wednesday, March 26, 2008

Just a quick useful little addon to Visual Studio. PowerCommands. Here's the link:

http://code.msdn.microsoft.com/PowerCommands

And here is a quick description from the site:

Below is a list of the included in PowerCommands for Visual Studio 2008 version 1.0. Refer to the Readme document which includes many additional screenshots.

Collapse Projects
This command collapses a project or projects in the Solution Explorer starting from the root selected node. Collapsing a project can increase the readability of the solution. This command can be executed from three different places: solution, solution folders and project nodes respectively.

Copy Class
This command copies a selected class entire content to the clipboard, renaming the class. This command is normally followed by a Paste Class command, which renames the class to avoid a compilation error. It can be executed from a single project item or a project item with dependent sub items.

Paste Class
This command pastes a class entire content from the clipboard, renaming the class to avoid a compilation error. This command is normally preceded by a Copy Class command. It can be executed from a project or folder node.

Copy References
This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes.

Paste References
This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node.

Copy As Project Reference
This command copies a project as a project reference to the clipboard. It can be executed from a project node.

Edit Project File
This command opens the MSBuild project file for a selected project inside Visual Studio. It combines the existing Unload Project and Edit Project commands.

Open Containing Folder
This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node

Open Command Prompt
This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively.

Unload Projects
This command unloads all projects in a solution. This can be useful in MSBuild scenarios when multiple projects are being edited. This command can be executed from the solution node.

Reload Projects
This command reloads all unloaded projects in a solution. It can be executed from the solution node.

Remove and Sort Usings
This command removes and sort using statements for all classes given a project. It is useful, for example, in removing or organizing the using statements generated by a wizard. This command can be executed from a solution node or a single project node.
Note: The Remove and Sort Usings feature is only available for C# projects since the C# editor implements this feature as a command in the C# editor (which this command calls for each .cs file in the project).

Extract Constant
This command creates a constant definition statement for a selected text. Extracting a constant effectively names a literal value, which can improve readability. This command can be executed from the code editor by right-clicking selected text.

Clear Recent File List
This command clears the Visual Studio recent file list. The Clear Recent File List command brings up a Clear File dialog which allows any or all recent files to be selected.

Clear Recent Project List
This command clears the Visual Studio recent project list. The Clear Recent Project List command brings up a Clear File dialog which allows any or all recent projects to be selected.

Transform Templates
This command executes a custom tool with associated text templates items. It can be executed from a DSL project node or a DSL folder node.

Close All
This command closes all documents. It can be executed from a document tab.

Wednesday, March 26, 2008 3:00:13 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Technical
 Tuesday, March 11, 2008

Went to the CodeTrip event on March 7th in Salt Lake City, UT. The topics presented was:

  • IE8 for Developers
  • Silverlight
  • Zoom Composer

Zoom Composer is really awesome, you can see it in action here at the Hard Rock Memorabilia site:

Talked to Tim Heuer and he invited me on the CodeTrip bus to go to Boise, ID. But I have a family I can't leave, otherwise Tim I would have been there.

I've been using the ASP.NET MVC Framework with Dynamic Data and the Entity Framework in my project for some new software (yes early adoptor). I think I could have made a nice demo for other developers.

Anyway here are some pictures:

Classroom:

 

The CODE BUS!

 

Inside the CodeBus:

 

Me and TIM Heuer (this guy had a hard time with camera, stood there like 3 minutes waiting):

 

Way to be so photogentic Tim.

 

Tuesday, March 11, 2008 9:45:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Silverlight | Technical
 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
Archive
<March 2008>
SunMonTueWedThuFriSat
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
About the Author/Disclaimer
Currently I am a Senior Software Engineer at Mobile Productive Inc a automotive tech company. Check us out at http://www.mpifix.com

Experience
  • Project Management: 4 Years (Apple Computers)
  • Computer Instructor: 2 Years (CompUSA)
  • Developer: 4 Years (RemedyMD, HRN, MPi)

  • Education
  • B.S in Computer Science from Neumont University
  • Certificate of Continuing Education from MIT

  • Linkedin

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright 2009
    Joshua T Stroup
    Sign In
    Statistics
    Total Posts: 19
    This Year: 0
    This Month: 0
    This Week: 0
    Comments: 5
    All Content © 2009, Joshua T Stroup