Design Pattern - Part 1

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.

Patterns originated as an architectural concept by Christopher Alexander (1977/79). In 1987, Kent Beck and Ward Cunningham began experimenting with the idea of applying patterns to programming and presented their results at the OOPSLA conference that year. Design patterns gained popularity in computer science after the book Design Patterns: Elements of Reusable Object-Oriented Software was published in 1994.

Classification:

Design Patterns originally grouped design patterns into the categories Creational Patterns, Structural Patterns, and Behavioral Patterns, and described them using the concepts of delegation, aggregation, and consultation.

Creational patterns

These patterns have to do with class instantiation. They can be further divided into class-creation patterns and object-creational patterns. While class-creation patterns use inheritance effectively in the instantiation process, object-creation patterns use delegation to get the job done.

  • Abstract Factory groups object factories that have a common theme.
  • Builder constructs complex objects by separating construction and representation.
  • Factory Method creates objects without specifying the exact class to create.
  • Prototype creates objects by cloning an existing object.
  • Singleton restricts object creation for a class to only one instance.

Structural patterns

These concern class and object composition. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.

  • Adapter allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.
  • Bridge decouples an abstraction from its implementation so that the two can vary independently.
  • Composite composes one-or-more similar objects so that they can be manipulated as one object.
  • Decorator dynamically adds/overrides behaviour in an existing method of an object.
  • Facade provides a simplified interface to a large body of code.
  • Flyweight reduces the cost of creating and manipulating a large number of similar objects.
  • Proxy provides a placeholder for another object to control access, reduce cost, and reduce complexity.

Behavioral patterns

These design patterns are about classes objects communication. They are specifically concerned with communication between objects.

  • Chain of responsibility delegates commands to a chain of processing objects.
  • Command creates objects which encapsulate actions and parameters.
  • Interpreter implements a specialized language.
  • Iterator accesses the elements of an object sequentially without exposing its underlying representation.
  • Mediator allows loose coupling between classes by being the only class that has detailed knowledge of their methods.
  • Memento provides the ability to restore an object to its previous state (undo).
  • Observer is a publish/subscribe pattern which allows a number of observer objects to see an event.
  • State allows an object to alter its behavior when its internal state changes.
  • Strategy allows one of a family of algorithms to be selected on-the-fly at runtime.
  • Template method defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior.
  • Visitor separates an algorithm from an object structure by moving the hierarchy of methods into one object.

Concurrency patterns

Active Object: The Active Object design pattern decouples method execution from method invocation that reside in their own thread of control. The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.

Balking: The Balking pattern is a software design pattern that only executes an action on an object when the object is in a particular state.

Double checked locking : Double-checked locking is a software design pattern also known as “double-checked locking optimization”. The pattern is designed to reduce the overhead of acquiring a lock by first testing the locking criterion (the ‘lock hint’) in an unsafe manner; only if that succeeds does the actual lock proceed.

The pattern, when implemented in some language/hardware combinations, can be unsafe. It can therefore sometimes be considered to be an anti-pattern.

Guarded In concurrent programming, guarded suspension is a software design pattern for managing operations that require both a lock to be acquired and a precondition to be satisfied before the operation can be executed.

Monitor object A monitor is an approach to synchronize two or more computer tasks that use a shared resource, usually a hardware device or a set of variables.

Read write lock A read/write lock pattern or simply RWL is a software design pattern that allows concurrent read access to an object but requires exclusive access for write operations.

Scheduler The scheduler pattern is a software design pattern. It is a concurrency pattern used to explicitly control when threads may execute single-threaded code.

Thread pool In the thread pool pattern in programming, a number of threads are created to perform a number of tasks, which are usually organized in a queue. Typically, there are many more tasks than threads.

Thread-specific storage Thread-local storage (TLS) is a computer programming method that uses static or global memory local to a thread.

Reactor The reactor design pattern is a concurrent programming pattern for handling service requests delivered concurrently to a service handler by one or more inputs. The service handler then demultiplexes the incoming requests and dispatches them synchronously to the associated request handlers.

How To Create A WAP Or Mobile Friendly Website

Mobile websites are specifically designed for viewing on Mobile Devices such as Mobile Phones. Wanna create a WAP or mobile friendly website? No probs, there are several mobile website builder who will help you to create your own site.

Site Description
mobiSiteGalore is a web-based free mobile website builder that enables even novice users to quickly and easily build full-featured mobile websites that work consistently on any mobile phone. mobiSiteGalore achieves this by being fully in compliance with W3C’s mobile web best practices 1.0 document. Websites built using mobiSiteGalore are guaranteed to score 5 out of 5 in dotMobi’s Ready.mobi test. With mobiSiteGalore, users can start building websites with no technical know-how, no prior experience building websites and best of all no software to download or install. mobiSiteGalore was launched on October 31, 2007. And has so far released 5 new versions in just 5 months. mobiSiteGalore today has more than 18,000 free users worldwide. mobiSiteGalore allows users to enable mobile commerce on their website by integrating Paypal, Google Checkout & Bango. Users can also monetize their website traffic by adding Google Adsense & Admob which are fully integrated in mobiSiteGalore.
Wirenode Wirenode which is a tool to create mobile Websites. It took about five minutes for anyone to create a mobile version of any website. User took the RSS feed, plugged it in, changed the name and clicked publish. It’s currently running on their .mobi domain but also can set it up to use anything the user want. You can create mobile websites with multiple pages, Create a simple demo page with one click, Include your images, Include images from Google Image Search, Create a table of content page, and Include simple widget on your page.
Mastering Grails Grails is a modern Web development framework that mixes familiar Java technologies like Spring and Hibernate with contemporary practices like convention over configuration. Written in Groovy, Grails give you seamless integration with your legacy Java code while adding the flexibility and dynamism of a scripting language. After you learn Grails, you’ll never look at Web development the same way again.
Tutorial This is a simple 5 minutes tutorial about How you can Create a Mobile friendly site or in technical jargon - WAP site for your website, blog and even forum.
Wapple Canvas™ Zest On 31 March 2008 Wapple proudly announce the launch of the next generation of mobile website building tools, Wapple Canvas™ Zest, which has all the features and power of its predecessor but with enhanced UI design and feature sets that suit different vertical markets.Wapple Canvas™ Zest is a perfect mobile internet platform for Business owners, mobile advertising, mobile commerce, mobile content stores, and news and information services.

Apple iPhone, Asia Demand Create Touch-Screen Boom

Apart from the iPhone, demand for touch screens is driven by new phones in Asia that allow the user to write Chinese or Japanese characters on the screen, usually with the aid of a stylus — much easier than entering those characters with a keypad. Most touch sensors are made Asia by companies that are relatively unknown in the United States.

touch_screen-apple-iphone

touch_screen-apple-iphone

It’s been a good year for touch screens.

The launch of the first iPhone model a year ago boosted interest in the technology tremendously, and the updated model available Friday likely will stoke enthusiasm further. Now touch-screen manufacturers are going flat out, and more devices will soon be controlled by the tip of your finger.

“After the iPhone came out, a lot of mobile-phone companies said ‘Oh, I can make that kind of touch-screen mobile phone, too,’” said Jennifer Colegrove, analyst at iSuppli Corp.

In the U.S., Sprint Nextel Corp. just introduced a touch-screen phone, the Samsung Instinct, that’s very reminiscent of the iPhone. Verizon Wireless this year introduced its first two phones that use touch screens as their main interface. Research In Motion Ltd. is believed to be making a touch-screen version of the BlackBerry. Sony Ericsson is bringing out its first touch-screen model in a few months.

read more iPhone Creates Touch-Screen Boom

বিরহ

ফুলবনে আজি বায়ু কেঁদে কয়

পাব কি তোমারে প্রিয়া?

চকিতে হাসিয়া খসিল কুসুম

ব্যাথায় ভরিল হিয়া

আকাশের তারা মৃদু হেসে কয়

ভয় কি তাহাতে আজ

টুটে ফেল সব লাজের বাঁধন

সরমে নাহি-গো কাজ

চকোর চকোরী নেচে ঊড়ে যায়

ফেলে শুধু আঁখিজল,

মেঘের বুকেতে চাঁদনি লুকায়

বারি ঝরে অবিরল

পাতায় পাতায় শিহরণ জাগে

কে যেন ডাকিয়া কয়-

মুছে ফেল আখিলোর বধু

ধরণী যে মধুময়

সাথীহারা পাখী কেঁদে উড়ে যায়

বিরহে ভরিছে বুক,

জনমের তরে হারায়েছে প্রিয়া

হৃদয়ে নাহি যে সুখ

ভালো না লাগা কাব্য

ভালো লাগেনা কাউকে আমার
ভালো লাগেনা কিছুই আমার

ভালো লাগেনা
খেলতে খেলা
মনের মাঝে
ক্ষোভ মেলা

ভালো লাগেনা
বাসতে ভালো
সূর্যী মামার
নরম আলো

ভালো লাগেনা
সমাজ রীতি
পথে ঘাটের
শত নীতি

ভালো লাগেনা
মানুষ জন
বন্ধু বান্ধব
আত্বীয় স্বজন

ভালো লাগেনা
বৃষ্টি ভেজা রাত
মাথার উপর
মায়ের নরম হাত

ভালো লাগেনা
শান্তিময় পৃথিবী
সুন্দর কোন দৃ্শ্যমালা
ক্যানভাসের কোন ছবি

ভালো লাগেনা
তারা ভরা আকাশ
রাত শেষে
মিষ্টি ভোরের বাতাস

ভালো লাগেনা
আরামের ঘুম
বর্ষা কালের সেই
আম কুড়ানোর ধুম

ভালো লাগেনা
ফুলের সুবাস
দিগন্ত জোড়া
নরম সবুজ ঘাস

ভালো লাগেনা
ইচ্ছেমত হাটাহাটি
পায়ের তলায়
ভিজে নরম মাটি

ভালো লাগেনা
কবিতা খাতা
জীবন বইয়ের
প্রিয় কোন পাতা

ভালো লাগেনা কিছুই এখন
ভালো লাগেনা কিচ্ছু আমার
মনের মাঝে কষ্ট জমাট
বন্ধ আমার মনের কবাট

লিখেছেন সুমাইয়া মুনিরা

How can import contact address/address book

Do you need to import your contact address or addressbook? Rapleaf Address Book API kit allows you to Rapleaf Address Book API through direct PHP function calls. The Address Book API allows for a user to import their email contact list (from Gmail, Yahoo!, AOL, and Hotmail) into any site. This API is used on dozens of sites and applications, and is a way for users to invite friends to a site, share content with people in their address book, and import their social relationships.

  • rapleaf_abook.php - the library file that you need to put on your server and include.
  • sample.php - a sample application to help get you started. It simply displays your contact list.

How you can use it:

Step 1: Include the library
<? require_once ‘rapleaf_abook.php’; ?>
Step 2: Initialize an address book object. You can find your API key here.
<? $abook = new RapleafAbook($api_key);?>
Step 3: Query the API for the contact list. You need to get the user’s email address and password through a form; see sample.php for an example.
<? $result = $abook->getData($email, $password);?>

The returned result has the following structure:

	<? $result = (
		'status'   => '200',  # HTTP status code returned by the server
		'error'    => '',     # error message if there are any
		'contacts' => (       # contact list
		               ([name]=>'dummy',  [email]=>'dummy@rapleaf.com'),
		               ([name]=>'dummy2', [email]=>'dummy2@rapleaf.com'),
		               ...
		              )
	);?>
You should check the status before attempting to process the contact list. The following example lists the contacts on success, prints the error message otherwise.
<? $html = '';
	if ($result['status']=='200') { # OK
		$contacts = $result['contacts'];
		foreach ($contacts as $contact) {
			$html.= htmlentities($contact['name'].' <'.$contact['email'].'>');
			$html.='<br />';
		}
	} else {
		$html = $result['status'].': '.$result['error'];
	}

	echo $html;
?>

You can find demo here: Demo
You can download sample code from here: Download

যে যায় সে যায়

কোন এক রোদেলা দিনে
তুমি এ হাত ছুঁয়ে দিয়েছিলে আনমোনে
তাইতো আজ আর এ হাতে কোন স্পর্শ লাগে না

কোন এক চন্দ্র রাতে
তুমি এ চোখে স্বপ্ন এঁকেছিলে অজান্তে
তাই তো আজ আর স্বপ্নেরা আমার কাছে আসে না

কোন এক বাদল দিনে
আমার সবটুকু অনুভূতি তোমায় দিয়েছিলাম
সেই থেকে আমি অনুভূতিহীন অনুভূতির বোঝা বয়ে বেড়াই

কোন এক বিষণ্ণ দিনে
তুমি আমায় মেঘ রং শাড়ি আর ছাই রং চুনরিয়ায় সাজতে বলেছিলে
তাইতো আজ আমি সাঁজঘরে একা

রূপালী নক্ষত্রের রাতে
কালপুরুষ চিনিয়েছিলে
তাই বুঝি আমার জীবনে কোন পুরুষের ছায়া পরেনা

কোন এক শিশির ঝড়া ভোরে
তুমি চলে গেলে বুঝেছি
ধরে রাখার ক্ষমতা সবার থাকেনা

লিখেছেন কাঁকন

Embed Bangla Font in your website

Test management tool - which one do you prefere?

SQATesters always wana know which tool do you use for test management and what is your experience with it? Which one do you consider fitting best your needs? There are freeware and licenced tools. So, most useful tools are given below:

Tool Description
Test Director TestDirector, is the first global test management solution, helps organizations deploy high-quality applications more quickly and effectively. Its four modules Requirements, Test Plan, Test Lab, and Defects are seamlessly integrated, allowing for a smooth information flow between various testing stages. The completely Web-enabled TestDirector supports high levels of communication and collaboration among distributed testing teams, driving a more effective, efficient global application-testing process.
HP Quality Center
HP TestDirector for Quality Center offers a single, web-based application that supports all essential aspects of test management. It provides a consistent, repeatable process for gathering requirements, planning and scheduling tests, analyzing results and managing defects and issues. This software enables your organization to digitize specific quality processes and procedures within the larger application lifecycle. It also supports high levels of communication and collaboration among your IT team.
Mercury Quality Center™ provides a web-based system for automated software quality management and testing across a wide range of application environments.
Bugzilla Testopia Testopia is a test case management extension for Bugzilla. It is designed to be a generic tool for tracking test cases, allowing for testing organizations to integrate bug reporting with their test case run results. Though it is designed with software testing in mind, it can be used to track testing on virtually anything in the engineering process.
Zyphyr Zephyr is a slick, feature-rich and affordable Test Management Tool. It has been designed by Test Engineers based on multiple years of real world test experience in managing and running large and small test departments.
Data Generator The Data Generator is a free, open source script written in JavaScript, PHP and MySQL that lets you quickly generate large volumes of custom data in a variety of formats for use in testing software, populating databases and more.
Fitnesse FitNesse is a collaborative testing and documentation tool. It provides a very simple way for teams to collaboratively create documents, specify tests, and run those tests.
MTS: Multi-TeSTer MTS: Multi-TeSTer: a simple domain-specific language for maintaining tests that supports two desirable properties: - single source: the command, input, and expected output are all in one file. - controlled experimentation: multiple slightly different tests can be generated from the same source with different expected outputs.
qaManager qaProjectManager is a web based application used for keeping track of engineering and customer releases of Software Projects, Resource allocations and related information. It helps QA Managers to keep track of releases effectively.Powered by OpenXava and Java.
QATraq Covers everything from defining test plans to writing test cases and recording results.
Radi Radi-testdir is a lightweight test director. Radi supports test director features like configuring the test plan, updating (create/edit) the test results for the test image/build stores in the image results set.
rth web-based tool designed to manage requirements, tests, test results, and defects throughout the application life cycle. The tool provides a structured approach to software testing and increases the visibility of the testing process by creating a common repository for all test assets including requirements, test cases, test plans, and test results.
RTH-Turbo RTH Turbo is optimized version of RTH, a testing management tool, that allows: requirement management; test case management; defect tracking; create test plans; analyze your test results. This project was originally created from RTH version 1.2, and this new branch and version is more powerful and optimized.
Salome-TMF Salome-TMF is an independent Test Management Tool, which helps you to manage your entire testing process – by creating tests, executing manual or automatic tests, tracking results, managing requirements and defects and producing HTML documentation. Salome-TMF is compatible with Junit, Abbot and Beanshell to define your automatic tests, and with Bugzilla and Mantis to manage your defects. Salome-TMF can also be extended by plug-in according to your requirements.
TCW Test Case Web (TCW) is an online TCM system built with PHP and a SQL backend. It provides an efficient means for generation, organization, and execution reporting of test cases among projects and by multiple testers and versions. It provides various at-a-glance views of the test suite for easy status determination and test suite navigation. TCW also provides basic reporting capabilities and per-project access control.
Tesly Tesly is a Web application written in PHP that helps you create, execute, and report on test plans. QA leaders can track the progress of testing as testers use the interface to report completion of test cases.
Test Environment Toolkit Open source version of TETware, a proprietary multi-platform test framework for test suite management (administration, reporting and sequencing of tests). This open-source version is for Linux and UNIX system users only. The differences between the open source version and the other version for which a commercial support offering is available is in platform support (WIN32 and Java) rather than functionality.
Testitool Testitool is a Web-based application for QA test planning. It creates a test plan and populates it with test cases, maps test cases to functional requirements, instantiates a test plan, begins executing test cases and marks them as successful or failed, generates reports on your test plans, copies test plans and test cases, and tailors test plan instances by adding and removing test cases from them.
TestLink Web-based test management and test execution system allowing QA teams to create, manage, execute and track test cases and organize them into test plans.
TestMaster A testcase management, logging, reporting and test automation tool, similar to the commercial product Test Director. Features: Progress stats, reports, test case import from CSV,doc,web or SQL, STAF plugin.
Ken TestMan It’s a Test Management tool which means it stores all of your testing documents. It tracks changes, stores results, links artefacts and shows real-time charts and tables.
QualityMate suite QualityMate (QM) suite of tools enables the organizations to industrialize the software development process providing support for different process activities like Requirements Management, Tests Management and Issues Management.

More Information on CodeIgniter

CodeIgniter is developed by the company Of ellisLab, and also by Rick by Ellis (Rick Of ellis) and by Paul [Burdikom] (Paul Of burdick).

Usually they separate from its special features:

* the support of versions PHP4 and PHP5.
* model MVC (Model-View-Controller).
* database maintenance Of mySQL, PostgreSQL, MSSQL, SQLite, Oracle.
* the well designed documentation on the Engl. language with examples.
* it is very rapid in the work. In this sense - standard of speed and an example for the imitation.

The resources, where you can get basic information about this product:

CMS developed by CodeIgniter:

Applications to CodeIgniter see by the open code:

Authentication Libraries of CodeIgniter:

Sessions:

XML, DOM, AJAX:

Form:

Graphs:

Pagination:

Some more Tutorials: