Silverlight 5 demo

Leave a comment

To my surprise, SAP ByD will have a short demo at the very beginning of presetation.

However, obviously it mask the fact that how the real runtime system looks like.

Just focus on the feature of Silverlight 5 -> http://channel9.msdn.com/Series/Silverlight-Firestarter/Silverlight-Firestarter-2010-Keynote-with-Scott-Guthrie

Say, what you see may be a lie, just touch it and feel it as us, Programmer, do daily.

About IVsHierarchy Structure for VSPackage Development

Leave a comment

VSPackage Hirerachy Series 0
VSPackage Hirerachy Series 1
VSPackage Hirerachy Series 2

Parameter checking-up for ItemId

Structural Properties

In the second part of the mini-series I illustrated how structural properties form the hierarchy of nodes in the collection of items behind an IVsHierarchy instance. The IDs of structural properties are defined in the __VSHPROPID enumeration. I summarize them in the table below. When I use the term “node” in the table I always mean the node within the collection of hierarchy items having the ID passed in the itemid parameter of the getter or setter.

ID Description
VSHPROPID_Parent The VSITEMID of the node’s parent item. For example, in projects a folder node is the parent of the files put into that folder. The property uses a System.Int32 value. If the node is a direct parent of the root node, VSITEMID_ROOT is retrieved. If the node is at the root level and it does not have a parent, VSITEMID_NIL is returned.
VSHPROPID_FirstChild The VSITEMID of the first child parented by the node in the physical layout of the hierarchy. The property uses a System.Int32 value. If the node is a leaf node and so does not have children VSITEMID_NIL is returned.
VSHPROPID_NextSibling The VSITEMID of the next sibling node in the physical layout of the hierarchy. The property uses a System.IntPtr value. If the node is the last one on its parent’s siblings list, a VSITEMID_NIL value is returned.
VSHPROPID_FirstVisibleChild The VSITEMID of the first visible child parented by the node in the visual layout of the hierarchy. The property uses a System.Int32 value. If the node is a leaf node and so does not have children VSITEMID_NIL is returned.
VSHPROPID_NextVisibleSibling The VSITEMID of the next visible sibling node in the visual layout of the hierarchy. The property uses a System.IntPtr value. If the node is the last one on its parent’s siblings list, a VSITEMID_NIL value is returned.
VSHPROPID_ParentHierarchy The IVsHierarchy instance owning the hierarchy of the node. If the hierarchy is not owned (nested) by any other hierarchy this property retrieves null. You can use this property for any node in the hierarchy; they will return the same parent as if you would use it for the root node.
VSHPROPID_ParentHierarchyItemid Nested (shortcut) hierarchies have an invisible node in their parent hierarchy that holds the shortcut to the root node of the nested hierarchy. This property retrieves a System.IntPtr value telling the VSITEMID of the node holding the shortcut. It does not seem logical, but you can use this property for any node in the hierarchy. The property value is the same VSITEMID as if you would use it only for the root node. Please note, this VSITEMID has valid meaning only in the IVsHierarchy of the parent hierarchy.

Furthermore when I use a property identifier I will omit the VSHPROPID_ prefixes from the names as they do not tell too much.

From the table above you can see that handling VSITEMID values is slightly chaotic. FirstChild and FirstVisibleChild use a System.Int32 type while NextSibling, NextVisibleSibling and ParentHierarchyItemId properties use System.IntPtr. As another twist we pass System.UInt32 instances for VSITEMIDs in the property getter and setter methods.

Earthquake – Facebook make its own datacenter open-source!!!

Leave a comment

When you run slowly, you don’t know how the world will be changed by Giant!
Facebook may change the game again, refer to Chinese Version of news.

The orignal news in Facebook site, Open Compute Resources.
Facebook of Open Compute Site!!!

Catch up with the wave!!!the most interesting topic!!!

Micrsoft Pex and Moles

Leave a comment

Microsoft UK Team for Pex and Moles
Get Started with Microsoft Pex and Moles
Brief introduction

Open Source Integration on SAP Composite Environment 7.x

Leave a comment

* UI Layer – Struts2 version 2.0.14

  1. Each web request handled by web default class loader will invoke a new Web session object [ObjectFactory or Filter object ] to load struts.xml file.
    Default class Loader path – under root classpath of Web application, exactlly speaking, under \servlet_jsp\\root\WEB-INF\classes. So in order to load Web jsp as action, you need to redirect action name based on class loader path.
    Root
           +—index.jsp+other jsps
           +—WEB-INF
           +—classes <= default class loader path of struts2
           +—lib <= runtime library
    So, when action mapping, A.jsp should be specified as follow ../../A.jsp in struts.xml or other include files.
  2. In order to see if Action is avaiable after the Web session has been started, config-browser could be used, the offical demo of Struts2 debugging could be found Debugging with Struts2.

* Business Reusble Layer – Stateless Session Bean , Hiberate and Spring

Reason

  • Spring and Hiberate could instantiate reusable bean during the deployment;
  • EJB could reuse the Spring and Hiberate bean instance in object pool during life cycle control;
  • Compared with JPA 1.0 OR mapping, Hiberate could provide a leaner implementation, if object cache optimization topic hasn’t been discussed.
  •  

Technical Architecture

    The main architecture has been shown in the following chart.

The core idea of multi-layers is that we can isolated Spring and Hiberate application under EJB layer, then construct a lean and shared Java Client Framework.Then in the UI layer, we can use struts together with Spring client bean to construct a lean UI layer.Easy to forecast that UI layer will be changed dynamically, however the underlined business foundtation services won’t be changed so much. With an isloated EJB layer and underlined core services implementation, together with interface contact, our architecture could adapt to the changes as fast as possible. A short description from bottom to up as follow:

  • Foundation Framework
  1. Platform EJB [Generic Service Layer, such as Generic HiberateDAO service and SAP JCO connection bean]
  2. Open Source libraries DC[Including standardize version of shared open source libraries]
  • Reuse Interface
  1. Share Interface – Cross VM interface [RMI interface, EJB interface, Hiberate DAO interface & Configuration], All of items could be serizable and be passed by different client. In short, Service Contact interface
  2. Java Client Framework – EJB Client Proxy[decouple EJB caller as simple JavaBean implementation, which could be used in Struts&Spring bean]; Reuse Web Client Optimization and Interceptor[Including Gzip of JS client scripts and Interceptor with Profiling for cross Platforms]
  • Business Framework – Common EJB for business logic
  • Presentation Layer –  Web UI layer
  • EJB Client Test Layer – Automated Java Test case based on EJB interface

Implementation of Prototpye

Now I’d like to give the detailed information about implementation prototype.