Showing posts with label sharepoint. Show all posts
Showing posts with label sharepoint. Show all posts

Thursday, December 30, 2010

Silverlight on sharepoint

Recently, i have a silverlight project being handed over to me, i was supposed to evaluate the security concerns that might go against my client's policy. I started off adding the feature into my site, saw the new web part.. added the web part to my site, but all it shows was a blank white space, it can't be clicked, when i right click, there's only a generic silverlight context menu. A bit of searching on msdn/technet, i saw this post: silverlight mime, did as they said and the fanciful silverlight components starting to load :)

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.

Wednesday, March 31, 2010

MVC architecture in Sharepoint environment

A lot of webpart developers (from what i observed in MSDN forums) always create webparts with the typical

CreateChildControls() and Render() to generate UI, and attempt to use Render, delegates to control the UI

It's very difficult to understand and code as many people know, but it's actually possible to split all this into 3 well-defined layers.

1st you need : SPMetal to create Entity objects, next you can use Linq to Sharepoint, (Sadly, it's out of support or development by the author as Sharepoint 2010 already have EF v4.0 (Entity Framework), which interop nicely between sharepoint and linq.

2nd you will need your own DAL(Data access layer), with Entity objects already catered for, you should have no problem doing the CRUD with it

3rd: you can use features like QuickPart to render UserControls, have a general idea now? With quickpart, you can generate UI easier, as well as validation, multi-views etc, the list just goes on and on.


And there you go, you have QuickPart as (View), DAL (Controller), SPMetal (Entity objects/Model), however, it still requires more effort to do transactional executions, Singleton/doubleton/n-ton SPWeb, SPSite objects (something like a connection pool).

Having problems with CAML?

When i first started MOSS development 1 1/2 years ago, i was still very weak in SQL, let alone querying Lists using CAML. Until i found this tool: CamlQueryBuilder

You can connect directly to your sharepoint site and start querying your lists, no need for modifying your CAML and redeploying your webparts to test your CAML queries. It certainly help speed development up by a few folds.

Microsoft Sharepoint 2007

What exactly is MOSS designed for? In short ECM or enterprise content management, it was never meant to be a platform or framework for developers to develop on. Sadly, my management and clients perceived MOSS as if it was a new language like C#, java, etc.

They are always asking me, "How come i can do that in .NET and Java, but why not in MOSS?". Well first of all, as i said, it's not Application framework like .NET and Java!!

Users are always comparing MOSS with .NET and Java just because to them, anything that can display pictures, buttons, tables is an app. We can't blame them though, in the eyes of a not-so-technically inclined person, that don't and will not understand the true use of MOSS.

I was being tasked to learn how to develop, administer and set up MOSS. It came as a double edged sword. I got my new job due to my skills and knowledge from there but it also hit me very hard when explaining to stakeholders and analysts.

I'm sometimes tired of people saying, "Why SharePoint list have such lousy performance?? 2,000 items limit and it's so slowwwww". Well, things are different in MOSS 2010, there are better support and scalability which boasts millions of list items and still give acceptable performance.

To quote my previous employer, "We are the Elites of the software development world, we are offered projects mainly because we are able to do things that most people said that it cannot be done!" Well, it's very good on the balance sheet but underlings like me are the ones that are struggling to explore the unchartered terrain. It propelled me into more abstract development designs..