Announcement: SocialShare Starter Kit (v1.0) is Released

SocialShare Starterkit v1.0 Relaesed. SocialShare Starter Kit is a kick start application that illustrate a wide range of features that needed to build a social site. And includes features like Status sharing,Blogs,Forums & more. Any one need a lightweight quick solution for his social portal,SocialShare Starter Kit is the savior.SocialShare Starter Kit uses T-4 templates to build logical layers (i.e. DAL/BLL) . The logical layers implemented here are based on Entity Framework 4.0. Its also a good example to learn T4 template and  how to utilize them work with asp.net data bound controls with minimum effort. I am continuously adding and fine tuning the existing feature list and performance. Checkout the app from codeplex SocialShare Starter Kit Home also documentation is available SocialShare Starter Kit documentation

Software Architecture Cheat Blog 1: Design Principles

This blog series will gather summary of all the software architecture design principles under one roof. Intention is to keep in touch with these principles.
First one is called “SOLID”, which is combination of five basic designing principles,

Single Responsibility Principle

Example: http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/
There should never be more than one reason for class to change.

Open – Closed Principle

Example: http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/

Software Entities (Classes, Modules, Functions, etc.) should be open for extension but closed for modifications.

Liscov Substitution Principle

Example: http://lassala.net/2010/11/04/a-good-example-of-liskov-substitution-principle/
Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.

Interface Segregation Principle

Clients should not be forced to depend upon interfaces that they don’t use.

Dependency Inversion Principle

A. High level modules should not depend on low level module. Both should depend on abstraction. Both should depend on Abstraction.
B. Abstraction should not depend on details. Details should depend on Abstraction.
Other important principles are

DRY (Don’t Repeat Yourself)

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
Aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures.

YAGNI – You ain’t gonna need it

Always implement things when you actually need them, never when you just foresee that you need them.

KISS – Keep it simple, Stupid!

Most systems work best if they are kept simple rather than made complex, therefore simplicity should be a key goal in design and unnecessary complexity should be avoided.

Seven Principles Of Software Development

  1. The Reason It All Exists
  2. KISS (Keep It Simple, Stupid!)
  3. Maintain the Vision
  4. What You Produce, Others Will Consume
  5. Be Open to the Future
  6. Plan Ahead for Reuse
  7. Think

REF: http://csharpsimplified.wordpress.com/2010/10/01/design-principle/

My flicker stream

At last, I dared to publish my own flicker photo stream.
check this out,
http://www.flickr.com/photos/imgalib/
A word of caution, amateur photography, see with your own risk :)

বাংলাদেশের ঐতিহ্যবাহী মেলা

সূর্যমণি মেলা: বাশ ও বেতের তৈরী নিত্য প্রয়োজনীয় সামগ্রী, যাত্রাপালা
ঐতিহ্য: ব্রিটিশ আমল থেকে উপজেলার আহমাদাবাদ (বেতাল) গ্রামে প্রায় ১০একর জমির উপর সূর্যমণি মেলা শুরু হয়।
স্থানঃ বানারীপাড়া
তারিখঃ 30/1/2012

মাছের মেলা:২ কিমি জুড়ে বিস্তৃত দেশের সবচেয়ে বড় মাছের মেলা, ১০ হাজার লোকের আগমন ঘটে (অন্য সূত্রানুসারে লাখো মানুষের ঢল নামে।)
ঐতিহ্য:প্রায় দু’শ’ বছর পূর্বে পৌষ সংক্রান্তির উৎসবকে কেন্দ্র করে যে মেলাটি শুরু হয়েছিল।
স্থানঃ মৌলভীবাজারের শেরপুরের
তারিখঃ প্রতিবছর পৌষ মাসের আটাশ থেকে ত্রিশ তারিখ পর্যন্ত। মূলত মেলা জমে ওঠে উনত্রিশ তারিখে।

ঘোড়দৌড়-গ্রামীণ মেলা:
ঐতিহ্য:প্রায় দু’শ’ বছর পূর্বে পৌষ সংক্রান্তির উৎসবকে কেন্দ্র করে যে মেলাটি শুরু হয়েছিল।
স্থানঃ মাগুরা সদর উপজেলার গাংনী-পাটোখালী গ্রামে
তারিখঃ প্রতিবছর ১২ ও ১৩ মাঘ।

গুড়পুকুরের মেলা:
ঐতিহ্য:৩০০ বছর
স্থানঃ সাতক্ষীরা এলাকার পলাশপোল স্কুলের মাঠ আর পলাশপোল গ্রামই হলো মেলার মূল কেন্দ্রস্থল
তারিখঃ বাংলা বর্ষপঞ্জি অনুযায়ী ভাদ্র মাসের শেষে অনুষ্ঠিত হিন্দু ধর্মাবলম্বীদের মনসা পূজাকে কেন্দ্র করে এই মেলা একমাসব্যাপী অনুষ্ঠিত হয়

রাস মেলা:
ঐতিহ্য:৩০০ বছর
স্থানঃ সাতক্ষীরা এলাকার পলাশপোল স্কুলের মাঠ আর পলাশপোল গ্রামই হলো মেলার মূল কেন্দ্রস্থল
তারিখঃ বাংলা বর্ষপঞ্জি অনুযায়ী ভাদ্র মাসের শেষে অনুষ্ঠিত হিন্দু ধর্মাবলম্বীদের মনসা পূজাকে কেন্দ্র করে এই মেলা একমাসব্যাপী অনুষ্ঠিত হয়

রাজপুণ্যাহ্ মেলা:
ঐতিহ্য:১৮৭৫ সালে
স্থানঃ বান্দরবান
তারিখঃ 19/1/2012 সপ্তাহ ব্যাপী

ঘুড়ি উৎসবঃ
স্থানঃ ঈনানি সৈকত
তারিখঃ ২/৩/২০১২

তাড়াশের দই মেলা:
স্থানঃ সিরাজগঞ্জ জেলার তাড়াশ উপজেলায়
তারিখঃ ২৮শে জানুয়ারী ২০১২

Patenga tour [Photo Blog]

Patenga beach is famous for sunset view. At last I managed to get rid of my machine life and do what I love to do, photography. Although I am not professional, but as amateur photographer, I believe its ok to share :)
Captured from my lenses.
Sunset: 1

Sunset: 2

Sunset: 3

Sunset: 4

Waiting :

Mark a class or method as deprecated in c#

Background

The attribute Obsolete is used to mark types and members of types that should no longer be used. the Obsolete attribute is found in the System namespace; which means you can specify the type as Obsolete or ObsoleteAttribute—the suffix “Attribute” is automatically added at compile-time. A class or function can be made deprecated in c# by using obsolete attribute.For class/function use this attribute at top of the class/function. You can call attribute constructor by two ways,

[System.Obsolete("WARNING_MESSAGE")]
[System.Obsolete("WARNING_MESSAGE",[show compiler error true|false])]

Below is the example that shows usage of both constructor,

[Obsolete("Method1 is deprecated, please use Method2 instead.")]
public string Method1()
{
//function body
}

Upon calling this function compiler wont produces warning or error.

[System.Obsolete("Class1 is deprecated, use class2"),true]
class Class1
{
public void Method() { //function body  }
}

Upon calling instantiating this class, compiler wont produces warning or error.

Places I want to see in my lifetime

I often wonder how amazing the world we live in.There is so many things to do, so many things to see, but its a shame that life is too short. As an occasional traveler I also want explore the world to its end, but it could only possible in a life time until unless if I suddenly became a jumper!! :) . So recently an idea came up to my mind that I should list all the places that I die to see in my life time (professional obligation :) need specification before start working). So this is the list of my destination

First place I want to go is Darjeeling @india. I heard so many awesome stuffs about darjeeling that I am absolutely fascinated to go there. Also I like to see Ghoom rail station which was declared a World Heritage Site by UNESCO.

Second place I want to go is maldives. I am absolutely fantasized to see the beaches and one particular thing I want to do is scuba diving and according to me the finest place is Manta point at Maldives. The best time of year to see the mantas is between June and November.

Next stop is Pangong Tso @India, china border. First I came to know about this place at movie called three idiots,  I was absolutely stunned to see the beauty of that lake. This spectacular lakeside is open during the tourist season, from May to September, but can’t reach there at winter. why ??? because that time this place is cut off from world due to snow.

My next destination should be Mount Bromo @Indonesia.This area consists of two main volcanic peaks, Mount Bromo and the continually active Mount Semeru!! (kidding me?? I am definatly going).

My fourth destination is Abu-Simbel Temples @Egypt. The most remarkable feature of the temple of Abu-Simbel is that the construction is oriented in a way that twice a year, the morning sun rays shine through the length of the inner temple cave and illuminate the statues of the four gods seated at the end of the cave.

My fifth destination is Machu Picchu @Peru, it is the most familiar icon of the Inca civilization. Specially the intihuatana is believed to have been designed as an astronomic clock or calendar by the Incas.

API quick links used for development

Playing with API is always been my passion. I love the idea to bond with other app and share the data with my app. Throughout my career I used several API to  various type of business applications. Some are very good with their simple interface , others are good at documentation, some got good community.  Through this post I tried to point the quick links where developers can start with different API’s. Also from my point of view I put a ranking in terms of  API integration usability, developer resource, community resource and sample code.

Payment Gateway’s

Authorize.net
(Usability: 8/10, Dev resource: 9/10, Community: 9/10, Sample code: 10/10)

Developer resources

http://developer.authorize.net/

Sample codes

http://developer.authorize.net/downloads/

Community resources

http://community.developer.authorize.net/t5/Integration-and-Testing/bd-p/Integration01

Paypal
(Usability: 6/10, Dev resource: 7/10, Community: 2/10, Sample code: 4/10)

Developer resources:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_documentation

Sample Codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code

Community resources:  https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/community_overview

CyberSource
(Usability: 6/10, Dev resource: 7/10, Community: 2/10, Sample code: 4/10)

CyberSource Simple Order API and SOAP Toolkit API Documentation:

http://www.cybersource.com/support_center/implementation/downloads/soap_api/SOAP_toolkits.pdf

Below resource covers processing credit card orders with CyberSource’s Simple Order API with the details of reason code

http://www.johnnybhome.com/forsale/SB_API.pdf

Social API’s

Facebook
(Usability: 9/10, Dev resource: 10/10, Community: 7/10, Sample code: 10/10)

Developer resources : http://developers.facebook.com/

JavaScript SDK with sample : http://developers.facebook.com/docs/reference/javascript/

Community resources: http://developers.facebook.com/blog/

Twitter
(Usability: 9/10, Dev resource: 10/10, Community: 7/10, Sample code: 10/10)

Developer resources: https://dev.twitter.com/docs

REST API and sample : https://dev.twitter.com/docs/api

Community resource : https://dev.twitter.com/discussions

Fixing database is in use error while restore database from backup

Background

When performing a full restore over an existing database, SQL Backup sometime report that the database cannot be restored because it is currently in use, like shown below

This error shows not only during restore backup, also for drop database or alter database as well.

Workaround

In this situation database administrator needs to disconnect all the connected users from a SQL Server Database to get exclusive access of the Database.In the situation where a full restore is blocked because users are currently connected to the database, the best solution to this problem is to take the database offline prior to running the restore, as this is the easiest way to kill all connections to the database.

Before restore attempt
Database administrator can execute the below mentioned TSQL command to get a Single User access to a database. SINGLE_USER WITH ROLLBACK IMMEDIATE command is used only one user can connect to the database at a time.

use master
alter database DB_NAME set offline with rollback immediate;

After restore
Database administrator can execute the below mentioned TSQL command to give Multiple User access to a database. MULTI_USER command is used any number of users who have rights to connect to the database will be able to connect to the database.

use master
alter database DB_NAME set online with rollback immediate;

So now all authenticated database user can connect to  the database again.

IIS deployment error There is a duplicate scriptResourceHandler section defined

Background

Few days back I was attempting to deploy a .net 3.5 website on the default app pool in IIS7 having the framework section set to 4.0, I get the following error,
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined.

Solution

The problem occurs because when you use framework 4.0 the machine config already has some of the section defined that were used in previous asp.net versions. So replace the sectionGroup of your existing web.config with the below configs
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>

Another work around is to rebuild website/web application using framework 4, and the problem went away.

How to remove “Click Here To Share” text on images from wibiya

Wibiya web toolbar is free & perfect for blogs, e-commerce sites, small websites. But it comes up with a disturbing option over each images of the site “Click Here To Share”, this prompt user to share this with other social platforms.

If you wish to remove the “Click Here To Share” text, follow following steps:

  • Log into your wibiya.com account.
  • Go to “Edit Toolbar”.
  • Click on the “Smart Share” app.
  • Go to Settings tab.
  • Uncheck “Image Recognition”.
  • Save


Follow

Get every new post delivered to your Inbox.

Join 61 other followers