26 sept 2008

Un Poco de Humor - Es Viernes


 LOBO,
 
POR QUÉ TIENES ESA FRENTE TAN SUDADA,
 LOS OJOS TAN AJUSTADOS 
Y ESOS DIENTES TAN APRETADOS?
  COÑO CAPERUCITA, DÉJAME CAGAR TRANQUILO ¿YA?



13 sept 2008

MS patterns & practices: App Arch Guide - Updates (Dic.2002 to Date.Now !)


Architecture and Design

The following diagram represents a common application architecture with components grouped by different areas of concern

 Arch.JPG

Architecture and Design Guidelines
 

Pattern Map


Area Relevant Patterns
Authentication and Authorization Direct Authentication
Brokered Authentication
Federated Authentication (SSO)
Trusted Sub-System
Caching Cache Dependency
Page Cache
Communication Pipes and Filters
Intercepting Filter
Composition Composite View
Template View
Transform View
Two-step View
Concurrency and Transactions Coarse Grained Lock
Implicit Lock
Optimistic Offline Lock
Pessimistic Offline Lock
Transaction Script
Capture Transaction Details
Configuration Management Provider
Coupling and Cohesion Adapter
Dependency Injection
Data Access Active Record
Data Mapper
Query Object
Repository
Row Data Gateway
Table Data Gateway
Exception Management Exception Shielding
Layering Entity Translator
Façade
Layered Architecture
Service Interface
Service Layer
Logging and Instrumentation Provider
State Management Context Object
Structure Client/Server
N-Tier
Software + Services (S+S)
Software as a Service (SaaS)
Platform as a Service (PaaS)
User Experience Asynchronous Callback
Chain of Responsibility
Validation Publish/Subscribe
_Workflow_ Data-driven workflow
Human workflow
Sequential workflow
State-driven workflow

 
 Business Layer Guidelines
 
Business Layer – When designing the business layer following are the key activities that you need to perform.
  • Identify the consumers of your business layer
  • Determine how you expose your business layer
  • Determine security requirements of your business layer
  • Determine your validation requirements and strategy for business layer
  • Determine caching strategy for your business layer
  • Determine exception management strategy for your business layer

Business Components – When designing the business components following are the key activities that you need to perform.
  • Identify different types of business components
  • Determine application design considerations
  • Identify transactional requirements
  • Identify how business rules are handled
  • Identify patterns that fit the requirements

Business entities – When designing the business entities following are the key activities that you need to perform.
  • Identify common data formats for business entities
  • Determine how data will be used in the application
  • Choose your approach for managing rules
  • Optionally choose your design for custom objects
  • Optionally determine serialization support
Presentation Layer Guidelines
 

Approach

Use the following steps to help organize your thinking when designing the presentation layer:
  1. Identify your client type. Choose a client type that satisfies your requirements and adheres to the infrastructure and deployment constraints of your organization.
  2. Determine how you present data. Choose the data format for your presentation layer and decide how you will present the data in your User Interface (UI).
  3. Determine your data validation strategy. Use data validation techniques to protect your system from un-trusted input.
  4. Determine your business logic strategy. Factor your business logic to decouple business logic from presentation layer code.
  5. Determine your strategy for communication with other layers. If your application has multiple layers, such as a data access layer and a business layer, determine a strategy for communicating from your presentation layer to these other layers.

Design Considerations

Use the following design principles when designing the presentation layer:
  • Choose the appropriate UI technology. Determine if you will implement a rich client, a web client, or a rich internet application.
  • Choose relevant patterns. Review the presentation layer patterns for proven solutions to common presentation problems.
  • Design for separation of concerns. Use dedicated UI components to focus on rendering and display. Use dedicated presentation entities to manage the data required to present your views. Use dedicated UI process components to manage user interaction processing.
  • Consider human interface guidelines. Review guidelines that have been established for your organization. Review common user interface guidelines based upon the client type and technologies that you have chosen.
  • Adhere to user-driven design. Before designing your presentation layer, understand your customer. Use surveys, usability studies and interviews to determine the best presentation design for your customer's needs.
 

Guidelines Index

J.D. Meier , Alex Homer, Jason Taylor , Prashant Bansode , Lonnie Wall, Rob Boucher, Akshay Bogawat.

Guidelines present the "what to do", "why", and "how." They're organized using frames. A frame is simply a collection of hot spot areas to organize the guidance into meaningful buckets.

Architecture and Design

Layers

 
 
 
 

11 sept 2008

MODELO WIN FORMS TO WEB !!, .NET DESKTOP TO WEB - AND OPEN SOURCES



COMO DIRIA UN AMIGO  2 PALABRAS :  IMPRE - SIONATE


AJAX  for Enterprises app

Visual WebGui (VWG) is a new 'Web like Desktop' platform that offers open source rapid application development (RAD) framework to develop Line-Of-Bussines AJAX & Silverlight applications atop the platform. VWG cuts down development time (proven up to 90%) , without compromising on extensibility, scalability, performance, security or complexity

4 sept 2008

SQLSERVER - Random Number Generator Script

 SQL SERVER - Random Number Generator Script - SQL Query


Random Number Generator

There are many methods to generate random number in SQL Server.

Method 1 : Generate Random Numbers (Int) between Rang

---- Create the variables for the random number generation
DECLARE @Random INT;
DECLARE @Upper INT;
DECLARE @Lower INT
 
---- This will create a random number between 1 and 999
SET @Lower ---- The lowest random number
SET @Upper 999 ---- The highest random number
SELECT @Random ROUND(((@Upper @Lower -1) * RAND() + @Lower), 0)
SELECT @Random

Method 2 : Generate Random Float Numbers

SELECT RAND( (DATEPART(mmGETDATE()) * 100000 )
                + (DATEPART(ssGETDATE()) * 1000 )
                + DATEPART(msGETDATE()) )

Method 3 : Random Numbers Quick Scripts

---- random float from 0 up to 20 - [0, 20)
SELECT 20*RAND()
    -- random float from 10 up to 30 - [10, 30)
 SELECT 10 + (30-10)*RAND()
            --random integer BETWEEN 
        AND 20 [0, 20]
SELECT CONVERT(INT, (20+1)*RAND())
            ----random integer BETWEEN 10 
        AND 30 [10, 30]
SELECT 10 CONVERT(INT, (30-10+1)*RAND())

Method 4 : Random Numbers (Float, Int) Tables Based with Time

DECLARE @t TABLErandnum float )
DECLARE @cnt INTSET @cnt 0
WHILE  @cnt <=10000
    BEGIN
    SET @cnt @cnt 1
    INSERT INTO @t
        SELECT RAND( (DATEPART(mmGETDATE()) * 100000 )
                    + (DATEPART(ssGETDATE()) * 1000 )
                    + DATEPART(msGETDATE()) )
    END
SELECT randnumCOUNT(*)
    FROM @t
    GROUP BY randnum

Method 5 : Random number on a per row basis

    ---- The distribution is pretty good however there are the occasional peaks.
    ---- If you want to change the range of values just change the 1000 to the maximum value you want.
     ---- Use this as the source of a report server report and chart the results to see the distribution
SELECT randomNumberCOUNT(1countOfRandomNumber
    FROM (
    SELECT ABS(CAST(NEWID() AS binary(6)) %1000) + 1 randomNumber
        FROM sysobjectssample
    GROUP BY randomNumber
    ORDER BY randomNumber

Alejandro A Sfrede
Arquitecto de Software
Microsoft Certified Professional

 

 

 


2 sept 2008

http://www.google.com/chrome download & conference

http://www.google.com/chrome


10:53 Good morning, browser battler watchers!

10:54 I'm installed in the front row at the Google press conference.
People are still filing in, hang on while I get everything set up.


10:54 [Image] Chrome Logo View
10:55 Today's topic, Google Chrome.
If you're looking for a live video stream, Google said they'd have
one. Links here:
http://news.cnet.com/8301-17939_109-10030035-2.html?tag=mncol;title

10:55 This blog will be my color commentary of the launch announcement.


10:55 [Comment From CovinaBob]
Good morning. Is this Rafe?
10:56 Yes, it's Rafe.
For everyone else sending me feedback... Wow! Thanks for all the
kinds words, sorry I won't be able to post and reply to most of them.
But I really do appreciate it, and if you have a really good question
I can address, I'll put up your note.


10:57 [Comment From Shen]
When and where to download?
10:58 [Comment From el lobo del mar]
Any word on when Chrome will be ready for downloading?
10:58 I hear 11am pacific.

10:58 We'll see

11:01 [Comment From RJS, Los Angeles, CA]
Hi Rafe, I read your post yesterday in regards to chrome being
available to PC users only at first...any idea when we could expect to
see the chrome make its way over to mac?
11:01 Good Q, I expect that will be a topic discussed here today

11:07 I'm trying to add some photos to the blog here, having some issues.

11:07 Oh well, we're going live now. Brian O'Shaugnassey (sp?) introing now

11:08 Demo will be first "in advance of launch"
Download will be available at NOON PACIFIC

11:08 Up now: Sundar Pichai, VP Prod Mgmt

11:09 How the comic came about: Scott McCloud is "a legend in the
comic world," and has handled complex topics. Scott was "embedded with
the team."

11:09 Why we built chrome....

11:09 (10 min on this, he says, then 30 min of demo)

11:10 Why we built chrome:
Web has evolved from static text to interactive pages (eg Google StreetView)
But "underlying browser architecuture is still very similar to
original Netscape"


11:11 We believe browsers should evolve a lot more to keep pace with
how the Web is evolving.

Sundar says, "I do all my work in a browser."


11:11 What could you do if you built a browser from scratch? That was
the genesis of Chrome


11:12 Google Search informed a lot of Chrome.
Simple, but powerful due to its powerful core
Chrome tried to emulate this: Simple experience but with a lot of
underlying technology


11:12 [Comment From Michel]
can you post the live video stream again please, the link you posted
is redirecting to this page

11:12 "This is Chrome... it has a very simple look"

11:13 Try this link for video stream
http://google.client.shareholder.com/Visitors/event/build2/MediaPresentation.cfm?MediaID=33101&Player=1


11:13 The slide of chrome -- VERY SIMPLE. Just a bunch of tabs and
an address bar.
"We don't interrupt the user at all... the browser should stay out of the way."


11:14 70% of time on browser is spent going back to things you've seen
before... we spent a lot of time on that use case.


11:14 The core...


11:14 Based on Webkit, same as Safari. "We wanted to make sure we
didn't make a headache for developers."


11:15 Why webkit?
It's fast.
It's a simple code base
It was "friendly to a lot of google devs"
And it's also used by Android


11:15 Chrome is multi-process
(this is the same stuff that we heard about in the comic so far)


11:17 Each tab runs as own process.
* browser is more responsive
* crash-resistant (can close a tab indep)
* more secure - tabs are sandboxed


11:17 "The multiprocess architecture is funamental to chrome and we
were able to do it since we rebuilt the browser from scratch"


11:18 Google rewrote javascript code from scratch, calling it V8.
Executes javascript "much much faster" than existing techs


11:18 Most web devs don't use javascript because it's slow. Sundar
thinks that will change thanks to V8


11:19 Chrome will launch today for vista and XP
"We are working very hard on Mac and Linux versions"


11:19 Was designed for multi platform, but we decided to launch Win
ver as soon as it was ready.
"A lot of use inside use Mac and Linux, there's enough internal
pressure" to get it out


11:19 Launching 43 languages, tho.


11:20 Final point:
Chrome is "fully open source, under a very permissive license."


11:20 "We borrowed code from Firefox"


11:20 Why do this?
"As the Web gets better, it has a very serious benefit for google."
"We can write better apps"


11:21 Announcing today:
CHROMIUM, the open source reousrce


11:21 Next up...
DEMO
by Ben Goodger (UI guy)
was at Mozilla... hmm


11:21 [Comment From danser]
Chromium will be at http://code.google.com/p/chromium/ - note the page
is forbidden instead of 404 right now.

11:22 UI coming up now...


11:22 Big focus on tab browsing... "a primary element of the browser"
"Kind of like title bars for web pages and apps"


11:23 "Wanted to make feature scale for heavy usage."
"We think tabs are coolest thing to come to browsers in 10 yrs"


11:23 can grab and drag tabs. "They're very friendly, it's almost like
you want to drag them"
You can drag them off the browser, or back in


11:24 some subtle niceties... ex if you close a tab, the next one over
slides so its close box is right under your mouse.

Editorial comment: Nice!


11:25 Address bar demo:
"Where's the search box??"
Isn't one -- there's just one address bar that doubles as search
Confusing to user since "you had to decide what you were going to do
before you did it."


11:25 They shall call it...

The Omnibox


11:26 "It's a little bit psychic"
They used to call it the "psychic omnibox"


11:26 Ok, let's see it...

It's a lot like the Firefox awesomebar, except the pre-fill is already
in your address bar, so you don't have to click down on a list to
select top result


11:27 If you keep typing, you can enter in URLs or enter search quereies


11:28 You can use other search engines, like Amazon, Wikipedia
Once you use a search box on a site, you then get a "press tab to
search" cue in the omnibox when you begin to type that url again, and
you'll get that site's search function.

This is cool, and smart


11:30 Start page / New Tab page
automatically shows you thumbnails of nice sites you visit most often,
plus list of your most-used search engines, recent bookmakrs you've
made, and recently closed tabs.

More nice features. Looks really useful.


11:31 It's the default home page.
Or if you have one you like, "we import that as well."
You can also choose to open browser with your own set of tabs

Required features, no big deal


11:31 Private browsing mode aka porn mode:


11:32 You don't want to clear out your history and cache, you'll erase
your omnibox history and top tabs.

So they have an "incognito window"

has a visual cue, a little detective in it

Dude, that is totally the wrong graphic for this mode


11:33 But the benefit is that you can browse in private w/o putting
data in your history, cache, etc.

Just like IE8 InPrivate mode. A new required feature... Hello, Mozilla??


11:34 Moving on..

The download file experience...
"You shouldnt have to manage a lot of things to make downloads work"

When you kick off a download, they pop into a little status bar on the
window. When they are completed, you can drag the files to wherever
you want.

So simple, but seems more clear than other browsers' DL functions.


11:35 [Comment From Siddharth]
when can i download this please tell me and where?

11:35 Gotta wait, sorry. They say noon pacific


11:36 A new kind of window for apps that "want to break free of the
browser window"...
the "pinocchio feature"

You can take a site (Gears only? not clear) and "create destkop
shortcut" from it.

The window it opens shows no browser UI, just the app itself.

It acts like a windows app - you can alt-tab to it, etc.


11:37 Next up...
Daren Fisher, Tech Lead
Topic: Under the hood


11:37 "We were very interested in the use case of users who leave
their browsers open for a long time" ... "who have a lot of different
things going on in parallel."


11:39 "It's really unforuntate when you lose your whole browser."
"It seemed obvious to us that it would be nice if the browser were subdivided."
Web pages should be separate from each other.
They are in Chrome. The rendering engine are in "sub child processes"
If one tab dies, you don't lose the other
Tabs can execute in parallel, there's no delay if one tab is busy

11:39 "It's especially nice if you have a dual-core CPU."

Heh, I gots 4 cores on my desktop at home, can't wait to try this


11:40 Security:
The rendering engine has no prividleges to talk to your PC.


11:40 "Bad guys have to find a way out of the sandbox. "


11:41 Demo of Chrome Task Manager
Looks like Windows Task Manager, shows all the processes, their memory
use, CPU use, and network use.

Neat. And yo ucan kill the processes/tab you don't like

Hints that you can minimze tabs

Says plugins run in a process... for example FLASH.

11:43 Demo: What to do with a misbehaving tab...

showing a locked up tab. can't interact or scroll.
But can still switch tabs.

Bad tabs get a cute "sad tab" display


11:44 can recover a crashed tab, back to where it was before crash


11:45 How about a bad plugin?

Showing what happens if you kill Flash process while playing a YouTube
vid... you get a "sad plugin" on the page, but the rest of the page
stays live.

And is easy to refresh the plugin by reloading the page


11:45 And now, the speed demo...


11:46 IE Demo, loading pages off of local file system... takes 220 ms.

Chrome, same demo... 77 ms.

Your milage may vary... we will test this when we get the code


11:47 The download is live, folks!
http://www.google.com/chrome

11:47 Now the V8 talk.

If anyone is still with me....


11:48 BTW I have Chrome running right now... it took like 30 sec to
install. More later, now back to our press conf...


11:49 Guy is talking about how the new virtual machine has "hidden
classes" with shared structure, like java and smalltalk. and I have
no idea what this means.

FeedCount

analytics

 
sfrede