Tuesday, March 25, 2008

Commerce Server 2007 implementation


I will trace this project process, I will see how much mistakes we made and

Monday, March 24, 2008

Model View Presenter --- MVP Design pattern


MVP pattern is one of the major patterns used for ectracting besuness logic outside of UI elements and by that, enabling unit testing the UI without the need for using sepecific UI based testing tools.

View contains the presenter instance
Presenter is the only class knowing how to reach to model and retrieve the data needed for performaing business logic.

Presenter talks to the view throgh the view interface (abstracted representation of the View without UI sepcific attributes)

View doesn't know nothing about the Model

a facade design patten

A facade, in software design terms, is an interface intended to simplify a more complex API.

Facade:
Knows which subsystem classes are responsible for a request. delegated client requests to approproate subsystem objects
Subsystem classes:
implement substem functionality
handle work assigned by the Facade object
have no knowledge of the facase and keep no reference to it

Wednesday, March 12, 2008

BizTalk Message Delivery

Message-Delivery Patterns

Scatter-gather
Request-reply
Publish-subscriber

Message-Processing Patterns

Aggregator
First in/first out
Splitter

Tuesday, March 11, 2008

What is ERP?

ERP-- Enterprose Resource Planning. ERP is a way to integrate the data and processes of an organization into one single system.

There are many advantages of implementing an EPR system; here are a few of them:

* A totally integrated system
* The ability to streamline different processes and workflows
* The ability to easily share data across various departments in an organization
* Improved efficiency and productivity levels
* Better tracking and forecasting
* Lower costs
* Improved customer service

While advantages usually outweigh disadvantages for most organizations implementing an ERP system, here are some of the most common obstacles experienced:

Usually many obstacles can be prevented if adequate investment is made and adequate training is involved, however, success does depend on skills and the experience of the workforce to quickly adapt to the new system.

* Customization in many situations is limited
* The need to reengineer business processes
* ERP systems can be cost prohibitive to install and run
* Technical support can be shoddy
* ERP's may be too rigid for specific organizations that are either new or want to move in a new direction in the near future.


The term ERP originally referred to how a large organization planned to use organizational wide resources. In the past, ERP systems were used in larger more industrial types of companies. However, the use of ERP has changed and is extremely comprehensive, today the term can refer to any type of company, no matter what industry it falls in. In fact, ERP systems are used in almost any type of organization - large or small.

In order for a software system to be considered ERP, it must provide an organization with functionality for two or more systems. While some ERP packages exist that only cover two functions for an organization (QuickBooks: payroll & accounting), most ERP systems cover several functions.

Today's ERP systems can cover a wide range of functions and integrate them into one unified database. For instance, functions such as Human Resources, Supply Chain Management, Customer Relations Management, Financials, Manufacturing functions and Warehouse Management functions were all once stand alone software applications, usually housed with their own database and network, today, they can all fit under one umbrella - the ERP system.

Wednesday, March 5, 2008

my website

http://ibatteryresource.com/

Thursday, February 28, 2008

BizTalk Components

Businees Rules EngineThe rules engine allows you to apply business process logic against message data. MS provides a full-featured tool for rules creation, called the Business Rule Composer.

Orchestrations
Provides a unique graphical interface for routing, evaluating, and manipulatiing incoming and outgoing messages
Orchestrations also provide a means by which you can communicate with web services, databases, and other corporate entities

Healthe and Activity Tracking(HAT)
monitoring the BizTalk

Business Activity Monitoring(BAM)
gives non technical personnel a portal to view the data

Business Activity Services
set providers functionality for managing and instantiating integration relationships with various trading partners.

Messaging
One could almost make the point that messaging is the core component of the BizTalk Server product. Messaging is not simply one particular application that you can start. It's a combination of adapters, pipelines, ports, and more that collaborate to effectively and efficiently manipulate and route your message data

Enterprise Single Sign-On
Enterprise Single Sign-On (SSO) is the process by which non-Windows authentication accounts can be granted or denied rights based on preferential mappings established by the BizTalk administrator. This allows you to take in a message that has established authentication through the trading partner's own criteria and correspondingly map that authentication to an internal account within your enterprise

BizTalk Server 2006

Adapters concepts:
File Adapter, Web Services Adapter
SQL Adapter, HTTP Adapter
these four collection of adapters that micorsoft has provided.

are the application-specific interfaces to the BizTalk messaging engine.


Web Services Adapter
Send and receive messages as SOAP packages over HTTP

File Adapter
Read and write files to the file system

MSMQ Adapter
Send and receive messages with Microsoft Message Queuing

HTTP Adapter
Send and receive messages via HTTP

WebSphere Adapter
Send and receive messages using WebSphere MQ by IBM

SMTP Adapter
Send messages via SMTP

POP3 Adapter
Receive e-mail messages and attachments

SharePoint Services Adapter
Access SharePoint document libraries

SQL Adapter
Interface with a SQL Server database

Wednesday, February 20, 2008

SQL dateTime, date

create function DateOnly(@DateTime DateTime)
-- Returns @DateTime at midnight; i.e., it removes the time portion of a DateTime value.
returns datetime
as
begin
return dateadd(dd,0, datediff(dd,0,@DateTime))
end
go

create function Date(@Year int, @Month int, @Day int)
-- returns a datetime value for the specified year, month and day
-- Thank you to Michael Valentine Jones for this formula (see comments).
returns datetime
as
begin
return dateadd(month,((@Year-1900)*12)+@Month-1,@Day-1)
end
go

create function Time(@Hour int, @Minute int, @Second int)
-- Returns a datetime value for the specified time at the "base" date (1/1/1900)
-- Many thanks to MVJ for providing this formula (see comments).
returns datetime
as
begin
return dateadd(ss,(@Hour*3600)+(@Minute*60)+@Second,0)
end
go

create function TimeOnly(@DateTime DateTime)
-- returns only the time portion of a DateTime, at the "base" date (1/1/1900)
returns datetime
as
begin
return @DateTime - dbo.DateOnly(@DateTime)
end
go

create function DateTime(@Year int, @Month int, @Day int, @Hour int, @Minute int, @Second int)
-- returns a dateTime value for the date and time specified.
returns datetime
as
begin
return dbo.Date(@Year,@Month,@Day) + dbo.Time(@Hour, @Minute,@Second)
end
go

Friday, January 4, 2008

Good Recommandation to mock up design site

http://www.templatemonster.com/

Avid using HTML Tables to Control Layout
the W3C officially discourages it:

www.w3c.org/tr/wai-webcontent

Back to the beerhouse again

You start by establishing the user experience you want people to have, and then you design the plumbing behing the scenes that will provide that user experience. Some basic considerations that affect the user's experience are the menu and navigation, use of images, and the organization of elements on the page. The menu must be intuitive and should be augmented by navigation hints such as a site map or breadcrumbs that can remind users where they are, relative to the site as a whole.
Breadcrumbs in this context refer to a set of small links on the page that form atrail that enables users to back up to a previous page by clicking on the link segment for a page higher in the page hierarchy.

code reusability and enhance maintainability.

Thursday, December 27, 2007

.NET serialization

Automatic Serialization:
Reflection use metadata exposed by every.NET component. Swrialies the object state into a stream. A stream is a logical sequence of bytes. The various stream types provided by .NET all derive from the abstract class Stream, in the System.IO namespace. By default the user-defined tyoe aren't serializable. [Serializable],[NonSerialized]

Thursday, December 13, 2007

ASP.NET Request Processing

ASP.NET request processing is based on a pipeline model in which ASP.NET passes http requests to all the modules in the pipeline. Each module receives the http request and has full control over it. The module can play with the request in any way it sees fit. Once the request passes through all of the HTTP modules, it is eventually served by an HTTP handler. The HTTP handler performs some processing on it, and the result again passes through the HTTP modules in the pipeline. During the processing of a http request, only one HTTP handler will be called, whereas more thatn one HTTP modules can be called.

Tuesday, December 11, 2007

Working with .NET Events

New term --- The object publishing the event is called the publisher, and the any party interested in the event is called a subscriber.

Delegate based Events

a delegate is nothing more than a type safe method reference,

public delegate void NumberChangedEventHandler(int number)

This delegate can be used to call any method with a matching signature, the name of method and the name of parameter are not important, but you have to have the same signature.

Here is example:

public delegate void NumberChangedEventHander(int number);

public class MyPublisher
{
public NumberChangedEventHander NumberChanged;
}
public class MySubscriber : Page
{
public void OnNumberChanged(int number)
{
string mes = "New value is " + number ;
}
}


UI call the delegate:

MyPublisher publisher = new MyPublisher();
MySubscriber subscriber1 = new MySubscriber();
MySubscriber subscriber2 = new MySubscriber();
publisher.NumberChanged += new NumberChangedEventHander(subscriber1.OnNumberChanged);
publisher.NumberChanged += new NumberChangedEventHander(subscriber2.OnNumberChanged);
publisher.NumberChanged(3);

,NET Request Pipeline

a request enters the pipeline, it handled by an instance of the HttpApplicaton class.
IHttpHandler interface the ProcessRequest method. the main work of a handler implementation goes.
The ProcessRequest method pass the param. HttpContext

.NET Re

Tuesday, December 4, 2007

the different between an abstract class and an interface

an abstract class can still have implementation. an interface can't have implementation or member variables.

a.net class can derive from only one base class, even if that base class is abstract. However, a .net class can implement as many interfaces as required.

an abstract class can derive from any other class or from one or more interfaces.

an abstract class can have nonpublicc methods and prperties, even if they are all abstract. In an interface, by definition, all members are public.

an class can have static methods and static members and can define constants. an interface can have none of those.

an abstract class can have constructors. an interface can't

Requirements for an asynchronous call

1)the component code should be used for both synchronous and asynchronous invacations
2)the client shuld be the one to decide whethere to call a component sychronously or asynchronously.
3)the client is able to issue multiple asynchronous calls and have multiple asynchronous calls in progress.
4)the component should be able to serve multiple concurrent calls

There are

Manage Connection pool

.net managerd providers manage the connection pool for us, using shared database connection. We can control the size of connection pool in connection string, for example:

const string connString = "server=localhost;" +
"uid=scott;" +
"pwd=tiger;" +
"database=Northwind;" +
"Min Pool Size=3;" +
"Max Pool Size=3";

What's that mean and what happened behind the scenes. When SqlConnection.Open() was called, the manager provider instantiatied an internal calls called SqlConnectionProolManger and invoked its GetpooledConnection method, passing into it the connection string. The pool manager examined all current pools to see if there was one that used a connection string that exactly matched the one it was given

Friday, November 23, 2007

a Set of User-selectable Themes

A theme is a group of related files stord in asubfolder under the site's/App_Themes folder, which contain the : Stylesheet .css file, Skin files theat define the appearance of server-side ASP.NET controls, server-side stylesheet files and images etc.

Avoid Using HTML Tables to control layout

Using DIVs and a separate stylesheet file to define appearance and position.
The site will load much faster for end users! the stylesheet file will be downloaded by the client only once, and then loaded from the cache for subsequent requests of pages until it changes on the server. If the layout by table the client instead will download the table's layout for every page.

The BeerHouse Reading --CSS review

http://library.books24x7.com/book/id_14277/viewer.asp?bookid=14277&chunkid=616591712

Learning take advantage of powerful features such as master pages and themes.
Review CSS:
the dot(.) profix the class --- custom style classes
HTML objects not another explicit class associated with
associate a style class to a HTML object by ID-- by using # prefix
mix the varioubs--.sectiontitle a
{
color: yellow;
}

.sectionbody a
{
color: red;
}

Monday, November 19, 2007

i AM HERE

http://library.books24x7.com/book/id_20566/viewer.asp?bookid=20566&chunkid=403692321

Example about JSON

var JSONstring =
'{' +
'"artist" :"Phish", ' +
'"title" : "A Picture of Nectar", ' +
'"releaseYear" : 1992,' +
'"tracks" : [' +
' "Llama",' +
' "Eliza",' +
']' +
'}';
function pageLoad()
{
var album = eval("("+ JSONstring +")")
var innerHTML = album.artist;
alert(innerHTML)
$get('placeholder').innerHTML = innerHTML;
var track = "";
for(var i =0; i {
track += "track #" + i + " = " + album.tracks[i]+ "
";
}
$get('placeholder2').innerHTML = track;
}

JSON Format

The JSON format leverages a subset of the object litereal notaion that JavaScript supports natively. In general, the information at www.json.org classifies the notation of objects as being either unordered key-value pairs, or ordered lists of items. Unordered key-value pairs are separated by colons and surrounded by curly braces. ORDERED LISTS, OR ARRAYS, are separated with commas and surrounded by right and left brackets.

Enbedding Script Resources

the difference between retrieved from the filesystem compared with embedded as a resource in a dll:
When the page to a script is used, the ScriptManager provides a callback to the ScriptRecource handler, which retrieves the contents.When retrieved as an embedded resource, the ScriptManager injects the call to Sys.Application.notifyScriptLoaded for you automatically. This allows you to start using scripts that you already have with ASP.NET AJAX without having to rebuild the dlls.

The Ubiquitous ScripManager

When the ScriptManager is included in the page, the AJAX Library scripts are rendered to the browser.





ScriptMode for both ScriptManager and ScriptReferences: the default value is Auto, the other values are Release, Debug and Inherit. When set to Auto, the determination is primarily the result of server settings. When debug set to true in the compliation section of the web.config file, or when the debug page directive is set to true.

Friday, November 16, 2007

Arrays

var array = new Array();
Array.add(array, "Junta");
Array.add(array,"Lawn Boy");
if(Array.contains(array,"Junta"))
Array.clear(array);
var items = ["Stash","Hoist","Tracking"] ;
Array.addRange(array, items);
Array.insert(array, 1,"Lawn Boy");
for(var i =0; i{
alert(array[i]);
}
Array.forEach(array, arrayMethod);


extend object:

var releaseDates = new Object();
13 releaseDates["Junta"] = new Date("May 8, 1989");
14 releaseDates["Lawn Boy"] = new Date("September 21, 1990");
15 releaseDates["Picture of Nectar"] = new Date("February 18, 1992");
16 releaseDates["Rift"] = new Date("February 2, 1993");
17
18 for(var property in releaseDates) {
19 alert(property + " was released " + releaseDates[property]);

Dates and numbers

The complexities of formatting really come into play when dealing with dataes and numbers. The ASP.NET AJAX Library adds format and localeFomat methods to the string, date and number objects. The format and methods are key for effectively controlling output.


var d = new Date();
var message = String.localeFormat("{0}\n{1}\n{2}\n{3}\n{4}\n{5}\n{6}\n{7}",
d.format("d"),
d.format("D"),
d.format("t"),
d.format("T"),
d.format("F"),
d.format("M"),
d.format("s"),
d.format("Y") );
alert(message);

registerEnum

Costco.ASPAJAX.Samples = function(name)
{
this._name = name;
}
Costco.ASPAJAX.Samples.MusicGenre = function ()
{
throw Error.invalidOperation();
}
Costco.ASPAJAX.Samples.MusicGenre.prototype = {
Blues: 1,
Classical:2,
Elevtronic: 3
}
Costco.ASPAJAX.Samples.MusicGenre.registerEnum('Costco.ASPAJAX.Samples.MusicGenre');
var genre = Costco.ASPAJAX.Samples.MusicGenre.Blues;
alert(Costco.ASPAJAX.Samples.MusicGenre.toString(genre));
alert(genre == Costco.ASPAJAX.Samples.MusicGenre.Blues)
genre = 10;
alert(Costco.ASPAJAX.Samples.MusicGenre.toString(genre));

Thursday, November 15, 2007

I am here

http://library.books24x7.com/book/id_20566/viewer.asp?bookid=20566&chunkid=422808113

Creating classes

JavaScript functions are used to represent class objects in the type system. The AJAX Library follows the pattern of declaring a function as the class constructor. JavaScript allows you to modify the prototype of the function directly, which is how the AJAX Library creates class members. The class must then be registered so that it can participate in the semantics of the type system.

varibale scope: the local memebers are accessed with a prefix of 'this', the script engine can then scope the lookup to the type and avoid searching any containing scopes. If you do not use this to indicate that the reference is local to the type. you will end up creating objects in the global scopt and see errors that can be confusing and time-consuming to track down.


Type.registerNamespace('Costco.ASPAJAX.Address');
Costco.ASPAJAX.Address= function (name, email)
{
this._name = name;
this._email = email;
}
Costco.ASPAJAX.Address.prototype =
{
get_name: function(){
return this._name;
},
get_email: function()
{
return this._email;
}
}
Costco.ASPAJAX.Address.registerClass('Costco.ASPAJAX.Address')
var address = new Costco.ASPAJAX.Address('you name','youname@costco.com');
alert(address.get_name());

Declaring Namespaces

function pageLoad(sender, args)
{
Type.registerNamespace('Wrox.ASPAJAX');
alert(Type.isNamespace(Wrox.ASPAJAX));
var namespaces = Type.getRootNamespaces();
var resultString = null;
for(var i = 0, length = namespaces.length; i < length; i++) {
resultString +=namespaces[i].getName(); //displays
}
document.getElementById('result').innerHTML = resultString
}

Tuesday, November 13, 2007

Today's reading end at here:

http://library.books24x7.com/book/id_20566/viewer.asp?bookid=20566&chunkid=422808113


Let me finish chapter 4 tomorrow!!!!! hopefully not much stupid things need to finish!!!

A function in JavaScript is a first-class type

It can be passed as an argument to another object. A function can receive arbitrary arguments to act on. It can return primitive types, or it can even retrun a new function.

XMLHttpRequest object methods and properties

Methods:

abort();
getAllResponseHeaders();
getResponseHeader(label);
open(method, rul, asyncFlag, username, password);
send(content) ----Execute the HTTP request, where the variable content represents data that is posted if applicable.

properties:
xmlhttp.status;
xmlhttp.statusText;
xmlhttp.responseText;
xmlhttp.responseXML;

XMLHttpRequest instantiation indentify browser

function FactoryXMLHttpRequest()
{
if(window.XMLHttpRequest)
{
return new XMLHttpRequest(); //most likely includes all browsers except Microsoft IE
}
else if(window.ActiveXObject)
{
var msxmls = new Array
( 'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.4.0',
'Msxml2.XMLHTTP.3.0',
'Msxml2.XMLHTTP',
'Microsoft.XMLHTTP'
);

for (var i = 0; i < msxmls.length; i++)
{
try {
return new ActiveXObject(msxmls[i]);
}
catch (e)
{
}
}
}

throw new Error("Could not instantiate XMLHttpRequest");

}

Understanding REST Theory

REST is useful because it works with current HTTP server architectures. The irony of REST is that to adopt it as an architectural style, the server does not have to be changed, but our coding styles do have to changes.

When creating an Ajax application, the HTML page and the referenced data files must be downloaded from the same domain.

Ajax Architecture Basics

The data is fetched from the server by using a Representational Sate Transfer(REST) architecture style. The essence of REST is to create a simpler web services architecture by using HyperText Transfer Protocol(HTTP). the overall idea is to generate content and to have that content filtered and processed. The filtered and processed content serves as an informaiton basis, where another process acts as a client that filters and processes the informaiton. THe filteres and processed information acts as an information basis for another client. Content is fluid and constantly modified.