Thursday, June 21, 2007

Recently I upgraded my DotNetNuke installation from 3.x to 4.5.3. Upgrade went smooth but I had tough time making dasblog work under DNN. (running on virtual directory under DNN).

I googled for solution nearly full day but didn't get the exact solution. All the solutions were for dnn 3.x though which I was using for around an year (on .Net 1.1). <Clear/> tag does not work to clear root HTTP modules and handlers settings which gets inherited to any .net applications under root.

Hope this solution helps guys in similar trouble. this can be applied for any DNN 4.5.3 installation to have any virtual directory within the same...

1) add following entries in the beginning of <httpHandlers> section of web config file in dasblog.

   <remove verb="*" path="*.captcha.aspx"/> 
   <remove verb="*" path="LinkClick.aspx"/>
   <remove verb="*" path="RSS.aspx"/> 
   <remove verb="*" path="*.asmx"/>
   <remove verb="*" path="*_AppService.axd" />
   <remove verb="GET,HEAD" path="ScriptResource.axd"/>

2) add entries in <httpModules> section.

  <remove name="Compression"  />
   <remove name="RequestFilter"  />
   <remove name="UrlRewrite"  />
   <remove name="Exception"  />
   <remove name="UsersOnline"  />
   <remove name="DNNMembership"  />
   <remove name="Personalization"  />
   <remove name="ScriptModule"  /> 

3) add following entries in <pages> tag.. (make sure, all attributes of <pages> tag (if exists) are same as before.  Idea here is to clear the namespaces).

<pages validateRequest="true">
<namespaces>
    <clear/>
   </namespaces>
</pages>

All this and you'd have your web application working under DNN!!!

Cheers!!!

posted on Thursday, June 21, 2007 11:09:16 PM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
 Wednesday, June 06, 2007

In software development, a  design Pattern describes a general solution to a design problem that recurs repeatedly in many projects. Software designers adapt the Pattern solution to their specific project. Patterns use a formal approach to describing a design problem, its proposed solution, and any other factors that might affect the problem or the solution. A successful Pattern should have established itself as leading to a good solution in three previous projects or situations.

Here are 3 categories of the Patterns involved in software designing...

1) Creational Patterns

  • Abstract factory pattern: centralize decision of what factory to instantiate
  • Factory method pattern: centralize creation of an object of a specific type choosing one of several implementations
  • Anonymous subroutine objects pattern
  • Builder pattern: separate the construction of a complex object from its representation
  • Lazy initialization pattern: tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the needed first time
  • Prototype pattern: used when the inherent cost of creating a new object in the standard way (e.g., using the 'new' keyword) is prohibitively expensive 
  • Singleton pattern: restrict instantiation of a class to one object

    2) Structural Patterns

  • Adapter pattern: 'adapts' one interface for a class into one that a client expects
  • Composite pattern: a tree structure of objects where every object has the same interface
  • Aggregate pattern: a version of the Composite pattern with methods for aggregation of children
  • Bridge pattern: decouple an abstraction from its implementation so that the two can vary independently
  • Container pattern: create objects for the sole purpose of holding other objects and managing them
  • Decorator pattern: add additional functionality to a class at run time where subclassing would result in an exponential rise of new classes
  • Extensibility pattern: aka. Framework - hide complex code behind a simple interface
  • Facade pattern: create a simplified interface of an existing interface to ease usage for common tasks
  • Flyweight pattern: a high quantity of objects share a common properties object to save space
  • Proxy pattern: a class functioning as an interface to another thing
  • Pipes and filters: a chain of processes where the output of each process is the input of the next
  • Private class data pattern: restrict accessor/mutator access

    3) Behavioral Patterns

  • Chain of responsibility pattern: Command objects are handled or passed on to other objects by logic-containing processing objects
  • Command pattern: Command objects encapsulate an action and its parameters
  • Interpreter pattern:  Implement a specialized computer language to rapidly solve a specific set of problems
  • Iterator pattern: Iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation
  • Mediator pattern: Provides a unified interface to a set of interfaces in a subsystem
  • Memento pattern: Provides the ability to restore an object to its previous state (rollback)
  • Observer pattern: aka Publish/Subscribe or Event Listener. Objects register to observe an event which may be raised by another object
  • State pattern: A clean way for an object to partially change its type at run time
  • Strategy pattern: Algorithms can be selected on the fly
  • Template method pattern: Describes the program skeleton of a program
  • Visitor pattern: A way to separate an algorithm from an object
  • Single-serving visitor pattern: Optimise the implementation of a visitor that is allocated, used only once, and then deleted
  • Hierarchical visitor pattern: Provide a way to visit every node in a hierarchical data structure such as a tree

    Look for subsequent posts for clarification of each one from C# point of view...

    Cheers!!!

  • posted on Wednesday, June 06, 2007 4:09:07 PM (Central Standard Time, UTC-06:00)  #    Comments [1] Trackback
     Monday, May 28, 2007

    via netfxguide

    The Microsoft .NET Framework 3.0 (NetFX3 or WinFX), is the new managed code programming model for Windows. NetFXGuide presents the best resources about the .NET Framework 3.0 including videos, tutorials, articles, source code and much more.

     

    Cheers!!

    posted on Monday, May 28, 2007 11:58:42 PM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
     Saturday, March 03, 2007

    via www.businessweek.com

    With a background in the Indian army, this Babson MBA student thought working in teams would be a breeze. He was in for a shock ...

    posted on Saturday, March 03, 2007 5:14:43 PM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
     Saturday, September 30, 2006

    via newsmotto

    Stuart Brown has grouped colors into three color sets -neutrals, muted tones and bold colours and called this Web 2.0 Colour Palette:

    Joseph followed the tip and made his wordpress blog theme web 2.0 like DC Media points to some more web 2.0 colors - Mile Burke’s The Web 2.0 Secret Weapon and a little more comprehensive web 2.0 Color palette. There is even a web 2.0 logo creator [Via Sticki Widgets ]

    And if you want to learn from the start - Web 2.0 Design From Start to Finish and Designing in Web 2.0

    Other Web 2.0 Links:
    Design, fonts, logos, blogs, etc.

    Web 2.0 Zen
    Jim Hobart on web 2.0 design and usability
    DIV & Pure CSS for web 2.0 design
    Web 2.0 Design Tutorials
    Web 2.0 Design Kit
    Top 10 Web 2.0 design
    Tag, You’re It
    Design, Font, Color, and Logo 2.0 from jeremiah
    Web 2.0 design for sale on Ebay!
    Corporate Web 2.0
    The Logos of Web 2.0
    Dion Hinchcliffe’s Web 2.0 Blog

    ..........

    Cheers!!

    posted on Saturday, September 30, 2006 4:18:40 PM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback
     Thursday, April 27, 2006

    Presented here is a nice article on Asp.Net optimization.. Via John Belthoff

    ************

    If you read all of the websites dedicated to Asp.Net you will inevitably read about the wonders of the DataGrid, DataList, and Repeater controls. While each of these has its place, if you are only displaying data there is a much faster and more efficient means to do so. A normal asp page execution procedure goes something like this. The code queries the database based on the Article I.D. and then brings back that information to the page where you display it in the fashion that you would like. This is a fairly straight forward approach with asp and is done all the time.

    So how do we speed up our asp.net pages?

    Number 1: Use Asp.Net Caching!

    This is a no-brainer, and I won't go into the brilliance or details of asp.net caching here because at the time of this writing Google has 2,780,000 articles on the topic. Basically instead of querying the database each time the page is loaded you only query the database once and load that result into the system cache. Subsequent calls to load the page retrieve the data from the cache as opposed to the database which gives you an instant and considerable performance boost. You can then set the cache for how long the cache should store the information as well as many other features. If you are not using the cache, you should be whenever possible!

    Number 2: If possible, do NOT use the standard Asp.Net controls.

    That's right. The standard asp.net controls are designed for rapid development and not page performance. They allow you to design pages that grab and display data very quickly but their actual performance suffers because of the extra overhead which is there for ease and speed of development time and not page execution speed.

    Instead, create either a User Control or even better yet a Web Custom Control which is by far the fastest performance wise and really quite easy to create and use.

    Number 3: Use an SqlDataReader or even better yet use a set based command for Sql Server data retrieval and simply execute that one command against the database.

    An asp.net SqlDataReader is a fast forward only datareader that closes the connection after it reads the last set of results. Now for my article pages we are only returning 1 particular result. In this case we would opt for the set based command. If you had more than 1 result returned, in your table of contents for instance, you would use the SqlDataReader because you are returning multiple sets of results.

    Set based commands are stored procedures that bring back data through parameters as opposed to a result set which then in turn needs to be looped through to obtain your data. So instead of writing your stored procedure like the following which brings back 1 result set:

    Select Title, Body, Author
    From Articles
    Where ArtID = 215


    We can write it using a set based command like this.

    Create Procedure mysp_GetArticle

    @Title varchar(200) Output,
    @Body varchar(8000) Output,
    @Author varchar(500) Output

    As

    Select @Title = Title, @Body = Body, @Author = Author
    From Articles
    Where ArtID = 215

    GO


    The above query will return only the three parameters called for and not a result or record set so you don't have to then walk through the returned record set that has only 1 result in it anyway. This second little process of work decreases your performance so you should avoid it whenever possible. Combine this technique with the asp.net cache.

    Number 4: Use Classes and ArrayLists as opposed to returning an SqlDataReader.

    Create a class and then if there are more than one set of results store those results into individual instantiations of that class. Finally store each of those classes into an ArrayList. You can then store only that ArrayList into the asp.net cache. So instead of getting the results back from a SqlDataReader when loading your page you get them from the ArrayList which is stored in the cache. Nice huh?

    Finally... you want to incorporate all of these techniques into your final results which would be performed in the following manner and sequence.

    On the first time the page loads, query the database and return all of your data storing it into individual classes. Then store each of those classes into an ArrayList. If you only have one single result you may store only the class into the cache. Then take your ArrayList and store it into the cache.

    Next create a Web Custom Control and pass the cached ArrayList to the custom control and loop out your data using the HtmlTextWriter which is very fast. Remember each subsequent call to load the page will be called from the cache which stores your ArraList of classes or your single class.

    Certainly it takes a significant amount of additional coding to do it in this fashion, especially when you take proper error handling into consideration, but if you follow this approach your pages will be screeching fast, you will immediately notice the difference, and your asp.net pages will execute in the proper sequence - Data handling in the Page_Load function and the html display in the Page_Render function.

    Further, you will be glad you did and so will your visitors.

    ************

    posted on Thursday, April 27, 2006 1:23:39 PM (Central Standard Time, UTC-06:00)  #    Comments [1] Trackback
     Tuesday, March 21, 2006

    To examine the advantages and disadvantages of software outsourcing, as well as the application of lean principles to software development, Harvard Business School has done a case study on Wipro's innovative Factory Model approach. It specifically explores Wipro's experimental use of lean principles as a source of new competitive advantage in software services.

    The case study addresses the advantages and disadvantages of software outsourcing and how to mitigate the effects of, for example, lock-in and hijacking. Explores how Wipro has helped its customers deal with these issues and looks at the changing competitive role of Indian outsourcers (from low-cost, to high-quality/rapid turnaround). Specifically explores Wipro's experimental use of lean principles as a source of new competitive advantage in software services. Also addresses the issue of standardization in information technology, examining why companies progressively develop so many standards and how companies like Wipro can help them standardize, thus limiting one of the primary drivers of companies' IT costs.

    A copy of the case study can be retained from either Wipro or Harvard Business School.

    posted on Tuesday, March 21, 2006 11:25:34 AM (Central Standard Time, UTC-06:00)  #    Comments [0] Trackback