Archive for April, 2012

web design sketches

Posted: April 27, 2012 in Anouncements

I had found today a wonderfull resource for the one who are envolved in the web design thinking especially Responsive webdesign.

 

So i Sahre with you all this wonderfull sketchsheets, resulting from a workshop of Denise Jacobs’ enjoy

 

http://jeremypalford.com/arch-journal/responsive-web-design-sketch-sheets

Advertisements

Last night i had been diving a little more in to my little azure case study, and i ask myself and if i consider a Multi tenant. This had report me to an all new study and issue consideration.

In this post i will explain some of the thoughts that had occur me about Multi Tenant application and Windows Azure.

Single Tenant and Multi Tenant

1st of all is important to remember the mean and difference of this two concepts. In an abstract way we can say that a Single Tenant Application  offers a separate logical instance of the application for each costumer while a Multi Tenant Application offers a single  logical instance for multiple Applications, that means that the logical instance is shared across clients. Is obvious that  in the case of datadriven applications different clients will have different access and views over the data, but the logical “infrastructure” to get that data is shared across clients. The next Figure illustrate the logical view of the two different concepts.

Understanding Multi Tenancy in Windows Azure

The distinction between Multi and Single Tenancy in Windows Azure is not as straightforward as in the conceptual view of Patterns, since an application in Windows Azure is almost always made up multiple components, each of which should be analysed to understand the “Tenancy option” of each one. So when talking about tenancy in azure we should think in each part of the solution and because for sure we will have different modules with different missions evolved (Web UI , Worker Roles, Storage and so on).

The decision of each what approach to make in an Azure web application should be analyzed in each part of the application and in each module essence.

So let’s discuss the architecture issues we should always to consider when talking about Multi Tenancy in the Microsoft Cloud.

  1. Making your Application Stable: If one of your architecture goals is to guarantee stability remember that an Multi Tenant approach is more vulnerable to instance failure then a multi instance approach. However he should always remember that Azure by concept allows you to deploy identical copies of our application in to different Windows Azure Roles instances.So we need to consider in the design of our application that she could be deployed to multiple instances.
  2. Handling Authentication: authentication and authorization handling is another thing you must consider. Since we can provide our own authentication mechanism or existing authentication systems. In a Multi Tenant application this will imply the support to multiple authentication systems.
  3. Scalable: In Azure scalability depends essentiality on being able to deploy multiple compute nodes while being able to access the same data from all that nodes. Both single Tenant and Multiple Tenant allows applications to use this feature to scale out. When designing a client server app you must consider that you may not want to have all your costumers sharing a single multi tenant instance, a case of this need is when you want group clients based on a functionality. We should also consider that in Windows Azure the prefered way to scale an application is to scale out by adding additional nodes instead of scaling up by using larger nodes.
  4. SLA: Another important issue to consider is the Service Level Agreements you intend to offer on you application, if you intend to offer different subscriptions to your application service sharing Application logic or computational power wouldn’t be a good idea.
  5. Application Upgrade: If we intend to create an application which the Applications upgrades are frequent, having a multi tenant solution makes it easy and cheaper at the same time, since all the application logic is updated in just a single step.
  6. Data architecture and Multi Tenancy: One of the major issues to consider is to ensure that a clients data is kept private from other clients. The perceived risk of data disclosure is greater in Multi Tenant architectures.
  7. Data architecture: There is a lot of ways that you can enable tenants to extend the data model and to include their own custom data. In the case of SQL Azure much of the applications hard implementation work will be based on having to work with constrains of fixed data schemas. In the case we are working with Azure table storage we can have the records in the same table with completely different structure, which give us a great flexibility.
  8. Scale at the data level: If we can partionate data horizontally we will be able to scale at out at data storage. In cases where SQL Azure is a must have to scale out we need to be able to move all our individual tenant dat to a new SQL azure instance.
This are some of the points to consider when discussing or thinking about a single or multi tenant architecture in Windows Azure platform. Don’t forget also the financial part of this choice.
Hope this small discussion can be off any help in your future architecture discussions and considerations, having Multi Tenant or Single Tenant architecture in Windows Azure goes far beyond the software patterns design cocepts.

Once again i had been teaching about Orchard in a workshop. It all run very well and this framework still inspire people. Off course all the orchard board knows that there is a long path to go until we reach the maturity of a complete CMS framework.

Thanks to the NHK for the opportunity to teach this framework.

And for all here stays the two parts slides i had presented until now in all the workshops about Orchard CMS i had gave including the course i gave in my company to my formed Orchard team.

http://www.slideshare.net/amarreiros/pragmatic-orchard

http://www.slideshare.net/amarreiros/pragmatic-orchard-2

And here you have the site of the Orchard project here you can learn more:

http://www.orchardproject.net/

If you need some extra information anad explanation i wopuyld recommend the book of o’reilly Orchard CMS upo and running 

Or the good course Pluralsight has to offer 

html 5 browsers support sheet

Posted: April 14, 2012 in Anouncements

HTML5 Cheat Sheet - Browser Support

html 5 cheat list

Posted: April 14, 2012 in Anouncements

HTML5 Cheat Sheet - Tags

HTML5 Cheat Sheet - Event Handler Attributes

I am working in the Sharepoint development from more than 6 years, first as developer then as a software architect now as teacher and Technical mentor and Technical Leader, and one-off the things that always make the developers shy is when we say “and if we build our own Sharepoint field”.

Look’ s like we are talking about black magic, the true is that building a field and have the knowledge to do that is the base to build yourself as a good Sharepoint developer because if you understand the “magic” behind this task you understand the way Sharepoint works. The  true is that you don’t have a lot of explanation about this topic on books or training classes.

In this post i will try to explain you the art of building a custom Field, and explain each need and step to achieve the goal of creating a custom field.

In our example we will build a field that will allow a sharepoint user to define the elements of a list that should appear ( a kind of multiplelookupfield but made based on a variationroot site). Since nowadays almost developers are using visual studio we will use the visual studio 2010 as our development tool.

Let’s start by creating a new empty SharePoint project in Visual Studio 2010

After that we should start to create the struture of our project according to the needs of our field. start by creating a mapped folder to the ControlTemplates Sharepoint Folder that is the place where User Controls of the Sharepoint Fields are deployed. Then create a mapped folder to the XML folder, this folder is where Sharepoint stores the definitions of the different elements that are recognized as part of the framework. In some cases You may also need to Map the XSLT folder typically when you have the need or will to use a transform to Generate the forntEnd of your control.

After the creation off our project structure let’s start by specifying our field definition. In sharepoint whenever you need to define a new type (and that is one way to see a Field in the sharepoint world). To do that we need to create a xml file in the mapped folder XML (that will be deployed by the WSP Solution to SharePointRoot\Template\XML), the file should be named as fldTypes_*.xml. The files from the SharePointRoot\Template\XML are read by the runtime at the sharepoint starts or whenever the application pool is started. This file is also used This file is used during list creation to define how field types are rendered in one or more of the different modes for viewing list data (more about this topic in   MSDN ).

Is int this file that the magic begins to be created let’s take a look to understand the meaning of each entry.In the TypeName we define the Name of the new Field Type. The ParentType defines the base type of sharepoint form where the new fields inherits functionality. the TypeShortdescription is the description definition that will appear at the sharepoint backoffice when the Sharepoint administrator Choose the field. UserCreatable defines  if the user can create or not new instances of the field. The FieldTypeClass defindes the server side implementation of the field.

After defining or Type, what had ben done in the creation of the file fldTypes_SPListItemSelectionField.xml let’s start by implementing the class that defines the behaviour of the field. for that intent let’s add a new cs file to our project with the follow name ItemListSelectionField.cs. In that file let’s declare the call ItemListSelectionField that inherits from SPTextFied as suggested in the Field definition written above.

The class has SPFieldText as is base class since we want to extend from this Field Type. Typically when defining a new field we need to override two methods the FieldRenderingControl and the GetValidationString (we have defined the second one only for demonstration proposes).

The GetValidatedString is responsible for returning the expression that validates our field imagine in cases like an email or others.

The FieldRenderingControl returns the control that is responsible for the rendering of the Field. In our case we are creating a new instance of the of The SPItemListSelectionFieldControl that is our user control. After the implementation of the class that defines our field and to define or field against sharepoint using the field definition file, we should define the way our field render himself.

The easiest way to do that is to use a ASP.NET UserControl, so let’s create a new User Control in the mapped folder ControlTemplate.

As you can see is a normal ASP.NET User Control we have deleted the assembly reference from the ascx since we will delete the class generated by visual studio for code behind to create our own class. In the Code present you can see we have two repeater a first to be used in the edit mode to show the different options of the list we can select and a second one that shows the different user choices separed by the character “;”.

As base class we have consider the BaseFieldControl class. The BaseFieldControl is a Sharepoint Class that defines the behaviour of every Sharepoint Field Controls.  We have override the CrateChildControls method since we have the specific controls present in our ascx file and we have the need to populate/manipulate them. We have also override the DefaultTemplateName this method is responsible for the return of the ID of the SharePoint:RenderingTemplate control that contains the actual implementation of the user interface. and then we also have the need to define the way the value is stored in our field and presented.  Let´s take a look

The way this property works can be a little tricky, the set is called when ever the field is saved and the get whenever the control is rendered.

After this we can build our code and deploy our solution to the Sharepoint farm, and this are the explained needed steps to build your own Sharepoint Field. This is an important knowledge when you really want to customize the types of data you receive from user and to build complex fields. Hope this post is helpful feel free to ask. I will post all the code with is explanation later on codeplex.

Building for different screen sizer should be one of the quest of every windows 8 developer and architect. for the ones with the same quest as me here goes a really nice article about this.

http://blogs.msdn.com/b/b8/archive/2012/03/21/scaling-to-different-screens.aspx?prod=zWin8z&type=zBLz