Author Archives: WUDI

Angular.js compile document to tree struction

the first step of angular.js is to compile document to element and childnode. this struction is similar with DOM. module is key concept of angular.js. what is angular.js module. A module is a collection of services, directives, controllers, filters, and … Continue reading

Posted in Angular.js | Comments Off on Angular.js compile document to tree struction

Angular.js – angularInit(..) and forEach

This is first post about Angular.js source code analysis. Angular.js start with following code. 1 2 3 4 5 bindJQuery(); publishExternalAPI(angular); jqLite(document).ready(function() { angularInit(document, bootstrap); }); bindJQuery(); publishExternalAPI(angular); jqLite(document).ready(function() { angularInit(document, bootstrap); }); Before it starts, it will go though … Continue reading

Posted in Angular.js | Comments Off on Angular.js – angularInit(..) and forEach

Umbraco – WriteLock and ReadLock with ReaderWriterLockSlim

this post is to clear how to use WriteLock and ReadLock to make sure critical resources have been visited properly. Take the following code for example in “public abstract class ResolverBase : ResolverBase where TResolver : ResolverBase”. 1 2 3 … Continue reading

Posted in Umbraco | Comments Off on Umbraco – WriteLock and ReadLock with ReaderWriterLockSlim

Umbraco – start of source code analysis with Logging System

This is first article about umbraco’s source code analysis. umbraco is big project using Asp.net MVC with 3338 cs file and lots of javascript/css/html. Normally it is bigger than enterprise project and it will take long time to analysis it … Continue reading

Posted in Umbraco | Comments Off on Umbraco – start of source code analysis with Logging System

Pet Shop 4.0 – Abstract Factory Pattern

This is the last article about Pet Shop 4.0 source code. some other code such as singleton pattern will be too simple to explain. When BLL Layer to get data from database, Pet Shop 4.0 uses “Abstract factory pattern”. This … Continue reading

Posted in PetShop4.0 | Comments Off on Pet Shop 4.0 – Abstract Factory Pattern

Pet Shop 4.0 – BreadCrumb

BreadCrumb is very simple part in Pet Shop 4.0 source code. “BreadCrumbControl.ascx” is main file and it is implemented in Master Template. add following code into “class BreadCrumbControl” in “Page_Load” function. 1 2 3 4 5 HtmlAnchor testAnchor = new … Continue reading

Posted in PetShop4.0 | Comments Off on Pet Shop 4.0 – BreadCrumb

PetShop 4.0 – Authentication and Login (1)

PetShop 4.0 Authentication uses ASP.net build-in User Authentication. Let’s See where User Profile is firstly. Open PetShop 4.0 with Visual Studio. and Select Web Project Then select menu “WebSite” -> “ASP.net Configuration” The following question is where databases to get … Continue reading

Posted in PetShop4.0 | Comments Off on PetShop 4.0 – Authentication and Login (1)

Pet Shop 4.0 – DataBase Map to Object

Pet shop uses very simple to map database columns to objects. Here are database’s table: Take Production Table for example, dbo.Production will map to ProudctionInfo in PetShop.Model. 1 2 3 4 5 6 7 8 9 10 11 12 13 … Continue reading

Posted in PetShop4.0 | Comments Off on Pet Shop 4.0 – DataBase Map to Object

Pet Shop 4.0 – CacheDependency and AggregateCacheDependency

CacheDependency is an important part in pet shop 4.0. Here is some example code on how to use CacheDependency 1. create a new xml file as following: 1 2 3 4 5 6 7 8 9 10 11 <?xml version="1.0"?> … Continue reading

Posted in PetShop4.0 | Comments Off on Pet Shop 4.0 – CacheDependency and AggregateCacheDependency

Umbraco – How to build Umbraco

1. Download Umbraco from github 2. %path%\Umbraco-CMS-dev-v7\build run “build.bat” 3. open %path%\src\umbraco.sln 4. build and run umbraco. It will setup database. The database only has table without view and stored procedure.

Posted in Umbraco | Comments Off on Umbraco – How to build Umbraco