http://www.cornerstone.se/expertzone/dev07/sessions_java.aspx
Declarative mappingFramework APIQuery LanguageTransaction Support
Entiteter: skall vara rena
ORM: Håller det hela i synk
Tjänster
Transparent Persitance
JPA 1.0 Declarative Object Relational Mapping
1. Classes are mapped to tables
2. Fields are mapped to columns
3. All types of relationships are supported
4. Support for embedded objects
5. Use either annotation or deployement descriptors
Laxy loading potentiellt problem med många sm@a
Eager loading kan ge stora SQL statements
Guideline Use laxy on relations and "fetch join" on queries
(Select * from Employee e LEFT JOIN FETCH e. phoneNumbers WHERE )
Contructor expressions in queries
Buld update delete
Valideringar - Lifecycle Callback
Day to day good stuff I find regarding my work
Thursday, May 24, 2007
Wednesday, May 09, 2007
Excel macro
Problem Fylla alla tomma celler i vald range i Excel med dom ovanfor.
Losning
Macro se
http://www.mvps.org/dmcritchie/excel/fillempt.htm
Losning
Macro se
http://www.mvps.org/dmcritchie/excel/fillempt.htm
Monday, May 07, 2007
Produktivitet
Nice links
Getting Things Done GTD
Getting things done
A survey of the Get Things Done Landscape Apps
Getting Things Done: The Art of Stress-Free Productivity Summary
Blog om GTD
A survey of the Get Things Done Landscape Apps
Getting Things Done: The Art of Stress-Free Productivity Summary
Blog om GTD
Software
MindManager Pro http://www.mindjet.com/eu/
MindManager Pro http://www.mindjet.com/eu/

Monday, April 16, 2007
Updated Nhibernet article
NHibernate Best Practices with ASP.NET, 1.2nd Ed. - The Code Project - ASP.NET
NHibernate Best Practices with ASP.NET, 1.2nd Ed
powered by performancing firefox
OO Design Principle metrics
http://www.parlezuml.com/metrics/OO%20Design%20Principles%20&%20Metrics.pdf
http://www.objectmentor.com/resources/articles/CoffeeMaker.pdf
http://www.objectmentor.com/resources/publishedArticles.html
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf
http://www.objectmentor.com/resources/downloads.html
http://www.objectmentor.com/resources/articles/CoffeeMaker.pdf
http://www.objectmentor.com/resources/publishedArticles.html
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf
http://www.objectmentor.com/resources/downloads.html
Wednesday, April 11, 2007
Best Practise in error handling webparts in Sharepoint 2007
Uploaded as an article to CodeProject
http://www.codeproject.com/useritems/Errorhandling_in_Webparts.asp
When installing a webpart in Sharepoint 2007 you need to have some kind of model how to handle errors. This is the approach I have used.
The entry points in the code are
1. CreateChildControls
Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
2. Render
Renders the control to the specified HTML writer.
The problem is that the user should get somekind of feedback in a readable format telling him OOhps the secound problem is how to communicate this to the System Administrator
My Approach
a) Create a private variable to store the Exception
private Exception childException = null;
b) In CreateChildControls have a try/catch and catch the error in the childException variable
try{
base.CreateChildControls();
.....}
catch (Exception exp)
{
HttpContext ctx = HttpContext.Current;
ctx.Trace.Warn(ex.ToString());
childException = ex;
}
c) In Render check if the have a try/catch and catch the error in the childException variable
and then display the result in the page by using labels..
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
if (childException != null)
displayErrorMsg(writer, childException);
try
{...
...
...
}
catch (Exception ex)
{
displayErrorMsg(writer, ex);
}
where
private void displayErrorMsg(HtmlTextWriter writer, Exception ex)
{
this.Controls.Clear();
this.Controls.Add(new LiteralControl(ex.Message));
if (ex.InnerException != null)
{
this.Controls.Add(new LiteralControl(ex.InnerException.Message));
}
this.Controls.Add(new LiteralControl());
base.Render(writer);
HttpContext ctx = HttpContext.Current;
ctx.Trace.Warn(ex.ToString());
}
http://www.codeproject.com/useritems/Errorhandling_in_Webparts.asp
When installing a webpart in Sharepoint 2007 you need to have some kind of model how to handle errors. This is the approach I have used.
The entry points in the code are
1. CreateChildControls
Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
2. Render
Renders the control to the specified HTML writer.
The problem is that the user should get somekind of feedback in a readable format telling him OOhps the secound problem is how to communicate this to the System Administrator
My Approach
a) Create a private variable to store the Exception
private Exception childException = null;
b) In CreateChildControls have a try/catch and catch the error in the childException variable
try{
base.CreateChildControls();
.....}
catch (Exception exp)
{
HttpContext ctx = HttpContext.Current;
ctx.Trace.Warn(ex.ToString());
childException = ex;
}
c) In Render check if the have a try/catch and catch the error in the childException variable
and then display the result in the page by using labels..
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
if (childException != null)
displayErrorMsg(writer, childException);
try
{...
...
...
}
catch (Exception ex)
{
displayErrorMsg(writer, ex);
}
where
private void displayErrorMsg(HtmlTextWriter writer, Exception ex)
{
this.Controls.Clear();
this.Controls.Add(new LiteralControl(ex.Message));
if (ex.InnerException != null)
{
this.Controls.Add(new LiteralControl(ex.InnerException.Message));
}
this.Controls.Add(new LiteralControl());
base.Render(writer);
HttpContext ctx = HttpContext.Current;
ctx.Trace.Warn(ex.ToString());
}
Subscribe to:
Posts (Atom)
Links
Labels
- "Sharepoint" TypeMock "Isolator For SharePoint" (1)
- ASP.NET (1)
- SharePoint (1)
- WSS (1)