Oscar Meszar, Author at Perficient Blogs https://blogs.perficient.com/author/oscar-meszar/ Expert Digital Insights Tue, 25 Mar 2008 13:22:00 +0000 en-US hourly 1 https://blogs.perficient.com/files/favicon-194x194-1-150x150.png Oscar Meszar, Author at Perficient Blogs https://blogs.perficient.com/author/oscar-meszar/ 32 32 30508587 Visual Studio 2008 and SharePoint Workflows https://blogs.perficient.com/2008/03/25/visual-studio-2008-and-sharepoint-workflows/ https://blogs.perficient.com/2008/03/25/visual-studio-2008-and-sharepoint-workflows/#respond Tue, 25 Mar 2008 13:22:00 +0000 http://blogs.pointbridge.com/Blogs/meszar_oscar/Pages/Post.aspx?_ID=17

As you probably heard by now, VS 2008, out of the box, comes with templates for creating SharePoint workflows.

The wizard will ask you give the workflow a name and tell it what local site you want to use for debugging it.

Next the wizard will ask you if you want to automatically associate the workflow with a library, a history list and a task list. To take advantage of the deployment feature of VS 2008 you should do this.

The wizard next question is how the workflow can be started. For development, I usually check “Manually by User” and “When an item is created”.

Once the wizard creates your project, you will see that it has created a feature.xml, a workflow.xml and it has signed the project. If you open the two xml files you will see that they are actually populated unlike the VS 2005 templates where you had to populate those.

One thing that I like to do is rename the class created by the wizard from its default name (Workflow1.cs) to something more project related. I’m going to rename it to “Demo”.

There are a couple of manual things you must do when you rename your class. First you have to modify the workflow.xml. You need to change the CodeBehindClass attribute to contain the right name. In our case it will be “DemoWorkflow.Demo”.

The next piece you have to change seems to be a bug in VS2008. When you change the name of the class, the “activitybindname” in the designer.cs class are not changed. You have to change those manually. Because of this little quirk is better to change the class name as soon as you get started or you will be changing many activitybindnames.

Happy Designing…

]]>
https://blogs.perficient.com/2008/03/25/visual-studio-2008-and-sharepoint-workflows/feed/ 0 223163
Silverlight Managed Code Development – The Basics (Part 3 of 3) https://blogs.perficient.com/2007/07/02/silverlight-managed-code-development-the-basics-part-3-of-3/ https://blogs.perficient.com/2007/07/02/silverlight-managed-code-development-the-basics-part-3-of-3/#respond Mon, 02 Jul 2007 16:13:00 +0000 http://blogs.pointbridge.com/Blogs/meszar_oscar/Pages/Post.aspx?_ID=13

As promised here is part 3 of the three part series on Silverlight development. Silverlight is a technology which fits very well in the Web 2.0 environment. One of the neat things about Web 2.0 is the concept of mashups. My focus in this blog is to create a mashup application in Silverlight which retrieves thumbnails from a website, presents the thumbnails and when a thumbnail is clicked the large photo is displayed.

The challenge for this implementation is that Silverlight Alpha 1.1 doesn’t allow cross-domain calling of web services. Microsoft has indicated they are working on providing this functionality; however, they have also indicated it is a hard thing to do and still keep it secured. In the mean time, or maybe forever, I will be showing one way to have Silverlight access a web service on a different domain. The technique I will be using is commonly known as proxy web services. I will be writing a web service in my local web server which in turn calls the web service on another domain and returns the same data types as the original domain’s web service.

In part 2, I left off by creating a web service in the local web server which returned a string to the Silverlight application.

Since part 2 I have gone ahead and modified the XAML from that application and have made it a bit more complex. I have added a few more elements which will support the gallery we’re trying to create.

As you can see from the screen shot above there are a few more elements. I have 4 canvas, and three text blocks. One text block contains the title of the application; the other two text blocks will be turned into buttons. As I mentioned in Part 1, I will not be using any additional controls and because of that, I have to build my own buttons. The text block element has mouse events which we can capture in our code behind. So I have wired the MouseLeftButtonUp event of both the Refresh and Close text blocks in the Page_Loaded event (see below.)

To create my mashup, I chose PhotoPoints.com web services since I’m very familiar with them (I wrote them.) You can find the implementation of these web services at http://www.photopoints.com/ws/ppws.asmx (by the way these are beta so you will not fine a whole lot of documentation besides the WSDL.)

I chose to only implement 2 of the methods for my sample proxy. I will be implementing the HelloWorld and the GetNewestFamilyThumbnails methods. The HelloWorld method I implemented only for testing purposes as I was building the application.

OK, let’s get started. First we need to add a web reference in our web application which points to the PhotoPoints web service. You do that by right clicking on the web application project and choosing the Add Web Reference… option. Enter the URL provided above on the address line and click Go. Once the web service is resolved, click Add Reference. I changed the Web reference name to PhotoPoints so if you are building along you might want to do the same so the screen shots make sense.

Next we want to do is add a web service to our web application. This is done the same way it was done before. I called mine PPProxy.asmx. The two methods I implemented are pictured below.

As you can see I return the same data types that I receive back from PhotoPoints; by doing that, I have eliminated the need to reformat the data when I receive the results from PhotoPoints. You will also notice the methods take in the same input parameters as PhotoPoints.

Now comes the “tricky” part. Silverlight doesn’t let us call cross-domain web services, but it does let us create a web reference to the cross-domain web service. Why is this important? If you look at the local web service above, you will notice that I’m returning PhotoPoints.Thumbs in the GetNewestFamilyThumbnails method. But the “Thumbs” class is not defined anywhere. So, by creating the reference in the Silverlight application to the original web service we will have all the classes and methods from that web service defined (reference.cs) and we will be able to use them in our application. To add the reference, right click on your Silverlight project and add a web reference. But, unlike in part 2 where we pointed to a local web service, this time we’re going to be pointing to http://www.photopoints.com/ws/ppws.asmx. I gave the web reference the name of photopoints (lower case) to make it different than the web reference in the web application. This is not a requirement though.

Now, let’s call our web service. And here we continue with the “tricky” part. As you can see from the code below, I’m instantiating a copy of the web service which points to PhotoPoints, but before I call any methods, I change its Url to point to my local web service. Doing this is what allows me to create the proxy on my web application and not have to redefine all the classes the original web service has implemented.

Below is the actual use of the data.

The first thing I do is make a call to the GetNewestFamilyThumbnails web method. I place the returned value in a module level private variable. I do that so I can have access to that data in other parts of the application. Once I make sure I have no errors returned I proceed to build a grid with the up to 9 thumbnails that are returned to me. Below is the rest of the GetData method which should be pretty self explanatory.

If you notice when I’m building the grid I wire an event (MouseLeftButtonUp) for each thumbnail I display on the page. I want to process that even so I can display the full size photo. See the code for that event below.

In the code you can see that I’m going through all the records I have in my Thumbs module level variable. Once I find the record that I want by comparing the thumbnail which fired the event URL with the one in the record, I retrieve the PhotoURL from the record and create an image which I add to the canvas and display it.

There are two more events that I handle. The first is when the person clicks the Close button to close the full image to go back to the thumbnails. The code for that event is displayed below.

The final even is the one that handles when the person clicks on the Refresh button on the top of the page. Code below.

So what happens when we run our application?

That’s the end of my demonstration. Of course, there is a lot more that can be done to the interface to make it better. As you can see at the time I wrote the blog there were over 271K photos on the website. I only display the top most recent 9 photos. We could add a paging mechanism to the thumbnail canvas. We could also create a slide show to display the full size images. And we could… You get my point of course. However, the very first thing I would add is a “wait cursor” from when I’m calling the web service. Hey, maybe that will be my next blog (calling web services asynch)?

You can see the Silverlight application in action at http://www.photopoints.com/main/Silverlight_Alpha/

]]>
https://blogs.perficient.com/2007/07/02/silverlight-managed-code-development-the-basics-part-3-of-3/feed/ 0 222961
SharePoint 2007 Search Relevance https://blogs.perficient.com/2007/04/06/sharepoint-2007-search-relevance/ https://blogs.perficient.com/2007/04/06/sharepoint-2007-search-relevance/#respond Fri, 06 Apr 2007 11:15:00 +0000 http://blogs.pointbridge.com/Blogs/meszar_oscar/Pages/Post.aspx?_ID=10

There are different factors which affect the relevance of search results in SharePoint 2007. I like to take a minute of your time to point some of those factors.

Document Title: Title is heavily weighted. If, however, the document title doesn’t exist, SharePoint will try to extract it from the document. This extraction only applies to Microsoft Office documents and not other file types. Many times what SharePoint automatically extracts is not correct so make sure that you add a title to the document.

URL Depth relevance: SharePoint cares about how deep the URL is from the root. The deeper it is the less relevant the document is from the search result. Notice, though, that URL depth is different than URL length. SharePoint counts the number of slashes “/” in the URL. The more slashes, the less relevant the document is.

Relevant Click Distance: SharePoint cares how many clicks a document is from the Authoritative page. The farther (more clicks) it is, the less relevant the document is to the search. It is imperative that Authoritative pages are defined to produce good search results.

Language Detection: Documents in the same language will have higher relevance than documents in other languages.

Document Types: Some documents types are considered of higher relevance than others. The list below show the relevance of document types in decreasing order of relevancy.

· Web Pages

· PowerPoint

· Word

· XML

· Excel

· Text

· List Items

There is one more factor that determines relevance which is very important. And that is the User Feedback. Basically is how a particular document is “viewed” or “accepted” by the user community.

Assume that two documents (Document A and Document B) have the same relevance so far using the factors mentioned above. The User Feedback might determine which document will be more relevant in the end. See this example below:

Document A

Document B

Document Edited 5 days ago.

Less relevant

Document Edited today

More relevant

Author has 20 other documents

More relevant

Author only has 2 other documents

Less relevant

User activity metadata matches

More relevant

User activity metadata doesn’t match

Less relevant

As you can see, determining the relevance of a document is not a trivial matter.

According to IDC users spend an average of 3.5 hours a week searching but not getting the proper result. The Delphi Group reports that 62% of the users are dissatisfied with the search result. And they also report that 73% of people spend more than 4 hours per week searching. Note: These are not SharePoint specific statistics but overall search experience statistics.

Considering the level of dissatisfaction and frustration reported by users polled and the not trivial nature of setting up search relevancy in SharePoint, you as a developer/consultant should consider in your project assigning a great deal of time to the search aspect of your website design.

]]>
https://blogs.perficient.com/2007/04/06/sharepoint-2007-search-relevance/feed/ 0 223012
MOSS Search Setup – Search Scope https://blogs.perficient.com/2007/01/01/moss-search-setup-search-scope/ https://blogs.perficient.com/2007/01/01/moss-search-setup-search-scope/#respond Tue, 02 Jan 2007 03:24:00 +0000 http://blogs.pointbridge.com/Blogs/meszar_oscar/Pages/Post.aspx?_ID=7
This blog continues with setting up searches in MOSS. In this article we will setup a scope for the shared file search content we created in my previous blog.
Search Scope PDF
]]>
https://blogs.perficient.com/2007/01/01/moss-search-setup-search-scope/feed/ 0 222859