Web part loading very slow in sharepoint 2007 - sharepoint-2007

I have a sharepoint site in which I have deployed 10 different custom web parts. There I have a particular web part which takes lots of time to load. (This particular web part is kind of a blog aggregator which connects to rss' and show the most recent blog post of each of the blogs specified in a list). All my other web parts are pretty much basic web parts. Since my blog aggregator web part takes a lot of time, it takes a considerable time to load the sharepoint site. So, my problem is that, how to load my sharepoint site with other web parts instantly, while loading the blog aggregator in background? (Just like in out-of-the-box RSS aggregator in sharepoint)
Your help is highly appreciable.
Thank you.

If the errant web part is closed source or vendor supplied, there's not much you can do (other than begging them to release an update).
If you can update the web part, one of the things that has worked for me is to split the web part's logic between javascript and a web service, and invoke the web service asynchronously via javascript. This will make the page appear to load faster because the rest of the page can render while your RSS part is waiting for a response. You will need to use a web service, rather than downloading the RSS content directly via javascript, to get around cross-site scripting protection in most browsers.
A javascript library like jquery makes it fairly simple to asynchronously invoke a web service.
The downside of this approach is that you'll probably need to tear out the guts of your web part and start over.

Related

Is it possible to build a Progressive Web App without client side rendering?

My company's site is mostly server rendered (we make some use of Structured Page Fragments) but we'd like to look into building a Progressive Web App.
Does it make sense to build a Progressive Web App by implementing service worker caching for server rendered pages? Alternatively, should we rather explore moving to client side rendering?
Note that we'd like to do as much rendering as we can on the server as we support many very slow devices.
Yes, service workers are definitely not restricted to client side rendering.
You can cache whatever you want. For example, this WordPress plugin caches WordPress content.
Server-rendered pages imply that there is some degree of dynamic or personalized content on your site—otherwise, you'd just be serving static HTML.
I'd encourage you to initially think about it from the perspective of how you want to deal with your dynamic content, both when you're online and offline. Reading through Jake Archibald's Offline Cookbook will give you a good overview of the different strategies that could be implemented.
Once you're set on a caching strategy for your dynamic content, the next step is to implement it. The "gold standard" approach is to use an App Shell + dynamic content architecture, but it can take some refactoring to get an existing application onto this architecture, especially one where the initial HTML returned by the server contains dynamic/personalized elements.
If refactoring is too daunting a task, or if server-only rendering is a hard-requirement, then you can still make use of service worker caching, but you'll probably end up treating your would-be shell as if it were dynamic content. This means a pure cache-first strategy might not be "safe", but a cache/network race might work, or at least network, falling back to cache.
Using both of those strategies, you'd end up with a web app that would work offline, but you'll likely end up caching duplicated data (i.e. if /page1 and /page2 share some common HTML structure, you'd end up caching that twice). You'd also take a performance and bandwidth-consumption hit since you'd have to go to the network more often than you would with an App Shell, but that could be mitigated somewhat via proper HTTP browser caching headers. (Which you should think about anyway, for browsers that lack service worker support.)

how to start asp.net mvc 4 ajax call

plaese guide me to start asp.net mvc 4 ajax enabled multi platform web application. I have a REST service hostrd in another domain, want to consume it. please guide me whether i need to access that service from javascript ajax call or
create models at server and request my server with ajax call. any guides links much appreaciated..
regards
ani
The exact way to consume your web service will depend on the content of this service, and how you want the user to interact, but, from my point of view, the server should be interacting with the webservice, and your user with your server. That is, as you guessed, "models" should reflect your web service data structure.
If you want to use ajax, use it to call methods in your controller(s) to load/update data from the webservice.
It's a bit difficult for me to go further without knowing what we are talking about, but to give you a better idea of what I am talking about, I wrote my own "API" to deal with Amazon Products Advertising API, using their rest service instead of SOAP. This same API is being used by 3 differents web applications.
Inside each web application there are AJAX calls to controller methods, who in turn calls my API methods.
This mechanism works perfectly in this case, but it may not in yours, which is why I believe you need to tell us a little more about hte kind of service and application you are going to build.
Sorry to stay a little vague, still hope this helps.
Bernard

BreezeJS with a Linux backend

I am working on a project where we have a very slim server (Linux, Nginx, Sqlite), but our web application shall not show any signs of shortcomings (should contain charts, dashboards, nice looking controls) – so I need the client to do all the heavy work.
I assume that BreezeJS would be good in this case, because it manages data on the client, in a way that reduces workload on the server. The server only sends the data to the client and at some point gets data back that has to be saved to the database. All caching and other stuff is managed on the client.
I assume AngularJS would also be good in this case, because it is a client-side MVC-framework, again reducing workload on the server. It also works seamlessly together with BreezeJS.
I assume Wijmo would also be good in this case, because it provides nice looking controls and also works seamlessly together with BreezeJS and AngularJS.
Are my assumptions right? Any comments?
My only concerns are how I get BreezeJS to “talk” with the Linux-server (Nginx, Sqlite). Are there any samples regarding this? Is anyone working on something similar?
We will be releasing a NodeJS/Express/Mongo example within the next few weeks that should show how to communicate with an arbitrary non-.NET backend. (also see the current 'Edmunds' example in the Breeze zip). But we don't have anything yet that explicity shows Breeze working with a Linux backend. Please vote for this here: Breeze User Voice

Http handler for classic ASP application for introducing a layer between client and server

I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system.
I'm thinking of writing a handler which will act as middle man between client and server and go through every request and find out who the user is and whether he is authorized to access the data he is trying to.
For the moment ignore about the part how I'm going to check the authorization and all that stuff. Just want to know whether I can implement a ASP.net handler and use it as middle man for the requests coming for a asp website? I just want to read the url and see what is the page user is trying to access and what are the parameters he is passing in the url the posted data. Is this possible? I read that Asp.net handler cannot be used with asp website and I need to use isapi filter or extensions for that and that can be developed only c/c++.
Can anybody through some light on this and guide me whether I'm in the right direction or not?
Note: To be specific, I cannot modify anything in the existing application because there are hundreds of pages (each page again has couple of different actions, such as posted to the same page again) are there in the system and it is really big mess and we are coming up with a different solution to clear that mess but that takes couple of years to complete, meanwhile to provide the multi-user functionality to the users we are trying to do this. This layer acts like layer where we authorize the user to do certain operation or access a page, nothing more than this.
I've worked with an ASP classic website that runs Javascript on the server side. In IIS we selected JScript as the server-side scripting language and access the session variables and the database simultaneously to check user's access rights when they try to check out various parts of the site. What you're describing is completely do-able. Each page needs to have Javascript in <% %> tags and that identifies the content as server-side code. Be careful with security though!
As for the ASP.NET handler, I also developed an ASP.NET application that I added imported to our site (had to use a .NET thread pool) which could handle Ajax requests. IIS has this option to import ASP.NET applications to your site.
You've got options.

how to create a web service

I building a website with Ruby on Rails framework.
The site will contain a flash application that will interact with the rails application using web service.
My partner builds the flash application and he told me that the flash application interacts through WSDL file.
I am new to web services. I would like to know how to create the WSDL file, and how to make the interaction between the rails application and the WSDL file.
If you believe that there are better alternatives than SOAP/WDSL, I would like to hear them too.
Thanks,
Oded
Have you Googled how to build web services in Ruby? Here are a few links that come up, all addressing exactly what you want to do:
http://www.tutorialspoint.com/ruby/ruby_web_services.htm
http://www.ibm.com/developerworks/opensource/library/os-ws-rubyrails/index.html
http://searchsoa.techtarget.com/tip/Web-services-with-Ruby-on-Rails
How about you take a look at some of those links, and come back to us if you have further questions.
I do have one elaboration:
My partner builds the flash
application and he told me that the
flash application interacts through
WSDL file.
It sounds like your partner has an incomplete understanding of how Flash can access remote data services. Using a SOAP Web Service with a WSDL is one method, for sure, and here is some documentation on that.
A Flex / Flash application can also make standard HTTP calls, sometimes called REST Web Services. In many cases, REST Web Services will return an XML Document, but that is not required. Any data, including simple text data, can be returned from a REST Web Service.
What many people prefer to do is to use an AMF Gateway with RemoteObject. AMF is a binary format so you'll get much smaller file size transferred back and forth than the alternatives. It also provides for automatic object translation between your server side objects and client side objects. This can be a time saver in development because you don't have to parse data to turn it into something Flex can use easily. RubyAMF is one Ruby implementation of AMF.
You'll be going through more pain than you need to by using WSDL.
Instead, I recommend creating a REST interface that returns json (or xml) -- you'll find in rails it will just work.
So you'll have things like:
/books # returns a list of books. Also do Searching here
/books/1 # return the detail of a book with ID of 1
Search for "REST Rails" and you'll get examples of controllers that will return JSON and XML depending on what the client requests.

Resources