Modular Design Patterns in JavaScript


In this article, I’ll be describing the structure and benefits of an extended modular design patterns, that includes four principal member types:

  • public: members that can be accessed from anywhere
  • private: members that can only be accessed from inside the object
  • privileged: members that can only be directly accessed from inside the object, but which can be indirectly accessed from outside via a public method
  • protected: members that can only be accessed from inside the object or any of its modules.

This article is not about object-orientation, because the structure we’re going to create is a kind of singleton, which is a single-instance structure that cannot be instantiated more than once. In fact, it isn’t instantiated at all (in the sense of having a constructor), so it’s an object-based rather than object-oriented pattern.

For more about the difference between object-based and object-oriented programming, and an introduction to object-orientated programming in JavaScript, I’d recommend Ryan Frishberg’s article: JavaScript Object-Oriented Programming.

Read More »

Events in the ASP.NET Request Life Cycle


copied from the Programming Microsoft ASP.NET 4 book, Page 32, Charpter 2, Part 1.

Events are fired in the following sequence:


The ASP.NET HTTP pipeline begins to work on the request. For the first request ever in the lifetime of the application instance, this event reaches the application after Application_Start.


The request is being authenticated. ASP.NET and IIS integrated authentication modules subscribe to this event and attempt to produce an identity.

If no authentication module produced an authenticated user, an internal default authentication module is invoked to produce an identity for the unauthenticated user. This is done for the sake of consistency so that code doesn’t need to worry about null identities.

Read More »

JavaScript undefined VS null


Copied from here





Read More »

How to pronounce symbols on keyboard?


copied from here

~ “tilde” or “tweedle” or “squiggly line”. Also used as a “swung dash” and in mathematics with other signs to mean “approximately” and in logic sometimes used to mean “not”. See Tilde on wiki

``` “grave accent” or “stress mark”. See… .

! “exclamation point” or “exclamation mark’. Used to end an emphatic sentence. Also often used in computer languages to mean “not” and in mathematics to indicate “factorial’. See Exclamation on wiki.

@ “at sign” or “commercial at sign”. See it on wiki.

# “number sign” or “pound sign’ or “octothorpe” or “hash mark”

$ “dollar sign”, for example $29.00 would be read as “twenty-nine dollars’

Read More »

Differences between StoredProcedure and UDF


The differences between Stored Procedure (SP) and User Defined Functions (UDF) in MSSQL

Ability SP UDF
Return Values Can return zero, single or multiple values Mandatory to return one and only one value
Can use transaction Yes No
Can have input/output parameters Both Input parameters only
Interop Can call functions from SP Cannot call SP from function
Can be used in SELECT WHERE HAVING statement No Yes
Exception Handling Yes, can Try-Catch NO

Written with StackEdit.

Read More »