Wednesday, May 26, 2010

Sharepoint 2007 memory leak (available temporary workaround)

Todd Carter's blog post

Todd Carter had uncovered a serious memory leak issue that wasn't due to sharepoint developers not disposing properly, it was due to SPHttpApplication’s Init() method. Read up on his blog for more details.

edit: hotfix was released by microsoft, please patch all your sharepoint servers! http://support.microsoft.com/kb/982741

Saturday, May 22, 2010

smartpart with AJAX

I've installed smartpart with AJAX, but when i try to add this webpart into the page, MOSS returned an error saying that the webpart is no longer there.

After a bit of searching, i've found in within codeplex discussion itself saying that adding these into the <runtime> node of the web.config. It worked.

<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>

Monday, May 17, 2010

SPListEngine

I'm finishing the final touches of the Sharepoint 2007 to LinQ helper, 2 things that i am unable/don't have time to incorporate:
  1. Transaction scope (best way i can think of is to use versioning in SPList to do it, but there is too much overhead and it's still not atomic)
  2. Relationships in LinQ (SPLists do not have referential integrity, manipulating manually requires using other frameworks like SLAM! which is not very well supported and widely used, and there's a lot of redundancies)
Will be finding a place to host it and seek feedbacks.

*update*

I've set up a repository @ https://www.assembla.com/ it's still alpha and not public
yet, drop me a mail for me to add you, if you are interested.

Monday, May 10, 2010

Sharepoint: How to achieve "Table of contents" on custom/default web part pages













This is a default web part page with "Table of contents" web part loaded. I assume that you can see the difference between this and the default "TOC".















This is also a default web part page however, without the need for me to add in a "TOC" web part. How do i do it?


First:














Go to your site collection features (note: site collection, not site)


Second:


Activate the publishing infrastructure feature.

Third:















Click on site features.

Fourth:


Activate Office SharePoint Server Publishing feature

Fifth:












When you click on "Site Actions", you will notice that you will have more options, click on "Create Page".

Sixth:



















Choose the template you need.

Seventh:












You will see this web part page (note that this page can be found in your "Masterpage gallery" which can be modified with Sharepoint designer, as i know most people do not have that many web parts in a single page, ironically, it's named "BlankWebPartPage". Not very "blank" in my opinion.

Eigth and final step:













Click on publish :)

And there you go, no more users complaining or asking "Hey, why is the table of contents so different in sharepoint??"

I hope that this post will help you lessen the amount of hair you will pull out of your head.

Wednesday, May 5, 2010

Sharepoint enterprise application development template

I haven't been posting any entries due to my exams and my current personal project. I came up with this idea to design an architectural template for MOSS development as my organization do not have many MOSS developers and expertise.

Things that i already achieved:

Incorporating n-tier architecture
Working with strongly-typed SPList entities generated using SPMetal
Data Access engine using generics and reflection to perform CRUD (Create, read, update, delete)
Utilities methods for config extraction
Changed the way MOSS UI is designed and developed in a more rapid/easy manner

Things that i want to achieve (i've conceptualized ways to do it, just need time):

Support atomic transactions when performing CRUD (Rollback, Commit, isDirty, etc)
Workaround with SPList to get satisfactory performance when exceeding 2,000 items
Improve exception handling
Audit trial using list event handlers (features)
Logging

Things that i still have doubts of feasibility/performance:

Using singleton pattern for heavy MOSS objects like SPSite


My school is starting soon, and i'm still thinking whether is this project of mine worthy of my effort or not. I am not the best architecture designer out there as well, but i will try my best to complete the designs and do proper unit tests and to document the architecture. I'm actually actively looking for help to work on it, if you are interested please contact me.