13 Replies Latest reply on Jan 9, 2014 4:48 PM by dnoonen

    Building web applications

    eradwan

      Hi There,

       

       

       

      As I'm planning to build a web application on top of AF SDK, I noticed that AF UI user interface elements are windows forms based, however, I'm targeting the browser for this job - asp.net and/or Silverlight - what other alternatives are available on this regard? I thought of the WebParts to serve the GUI part of the application but found it always connected with 'configuration' instead of 'Programming'; will you please shed some light and help me on this whole issue?

       

       

       

      Regards,

       

       

       

      Emad.

        • Re: Building web applications
          Marcos Vainer Loeff

          Hello Emad,

           

          You are right. The AF UI objects are supposed to be used in Windows Forms. If you are developing an ASP.NET page, your page will show ASP.NET objects and you will leverage the PI AF SDK methods to fetch data internally. The same is valid for the Silverlight.

           

          In theory, PI Web Parts should be used under SharePoint. I have never tried to import it into an ASP.NET page. I believe it is not possible to do so as it probably requires SharePoint libraries.

           

          Hope this helps you!

            • Re: Building web applications
              eradwan

              Hello Marcus.

               

              Thanks for taking the time to reply. So you think that using the AF SDK behind the scene I'll be able to build a fully functional interface that mimics the windows forms UI objects, in other words, is building a replica of the Tree View for the AF elements structure doable? On the other hand, if I select SharePoint as the development platform, what about laying out the required PI Web Parts in the page and having a custom part in a User Control that I'll build in C# and host it also in the page as another Web Part, the question is, to what degree a programmatic integration can happen like listening to events in one Part and based on that , an action to be executed in another?

               

              Regards,

                • Re: Building web applications
                  Marcos Vainer Loeff

                  Hi Emad,

                   

                  First of all, could you describe with details what does your ASP.NET page will do? I understand that you need a Tree View, is that correct? What else do you need?

                    • Re: Building web applications
                      eradwan

                      I'll need something similar - in functionality - to the Time Range and Trend Web Parts. That's why I feel that a way - if possible - to 'integrate' and code behind in SharePoint will be better than building from scratch using ASP.NET components.

                       

                      Regards,

                        • Re: Building web applications
                          eradwan

                          Hi Marcus,

                           

                          The application should merge two functions currently available in our plant, users utilize Pi Data Link to view real time data from one side and LIMS data from another Oracle application; the new system will utilize AF to map both process and quality data, on the user interface side, and as we need a web application, the Tree View representing what's on the AF is the main thing, a Silverlight based SpreadSheet control will be used to display returned data. As mentioned above, if I can have something similar to the Time Range Web Part for date ranges in PI syntax, and an equivalent to the Trend Web Part for trends, then I'll be happy. :)

                           

                          Regards,

                            • Re: Building web applications
                              Marcos Vainer Loeff

                              Hi Emad,

                               

                               I have talked to some people and the conclusion is that it really depends. There are two options if I understood correctly:

                              1. Develop an ASP.NET page from the beginning with PI AF SDK.
                              2. Create a custom web part to be used in SharePoint so that he can leverage the objects from PI Web Parts.

                              Below is one interesting comment I have received:

                               

                              “Well, for option 1, creating something from scratch means that, given the competence of the programmer, you can make sure it meets pretty much all of your functional requirements.  I would consider this a positive.  I would say that the necessary expertise and time required to develop and sustain custom code would be seen as a negative.  This is based on the old concept of “Build, Buy, or Accquire”.

                               

                              For option 2, the current version of PI WebParts still supports the older interfaces that allows one to integrate custom web parts to PI WebParts, but they have been deprecated by Microsoft.  I would consider this a positive and a negative.  Offloading more of the ‘custom’ code into existing PI WebParts should be seen as a positive.

                               

                              It might help you if you could do a screen mockup of what you think it should look like at the end of the day along with a ‘day in the life’ description of what it does and how it will be used.”

                               

                              Hope this helps!!

                                • Re: Building web applications
                                  JohnFors

                                  Option 3 which I think would work from reading your post with out all the requirements(disclaimer).  Could you use an custom AF Datareference to retrieve the values from the LIMS for output to AF-Attributes.  Then you could use all the Webparts to display the data as if it were all PI Data.

                                    • Re: Building web applications
                                      eradwan

                                      Thanks Jon for participating. Actually this is my plan for AF, to use it for both kinds of data, my worry about PI Webparts is the lack of behind the scene programmability, assume for example that I want the Tree View representing the AF elements to allow drag & drop to an Excel based control and 'on drop' I want all of the elements - in the dragged equipment - to appear in a single trend. I don't want to re-invent the wheel and develop controls to simulate PI UI, but nothing in the Webparts documentation - Marcos almost confirmed that above - is mentioning the ability to write code for Webpart events if any.

                                        • Re: Building web applications
                                          eradwan

                                          Looking at this issue from a different view, does anybody knows about third party - asp.net or Silverlight - controls that can help in such web based PI applications' development?

                                            • Re: Building web applications
                                              pkaiser

                                              PI WebParts are designed to be customized through configuration rather than programming -- that is a key component of their value. They are constructed on the SharePoint web part base class, not the ASP.NET web part base class, so they cannot be used outside of SharePoint.

                                                • Re: Building web applications
                                                  dnoonen

                                                  Hi Emad.  I can't immediately answer your question about third party controls, but I wanted to let you and the rest of the people involved in this thread know that I'm going to contact you separately to further discuss your situation.   We are in the process of building a REST API on top of the PI System and I'm guessing we'll hear similar questions/comments as we evolve our REST system.   After talking to you I'll post a summary back to this thread.

                                                   

                                                  Dan Noonen.  Product Manager, PI System Access.  OSIsoft.

                                                    • Re: Building web applications
                                                      eradwan

                                                      Hello Dan,

                                                       

                                                      Firstly, let me wish you and all members of vCampus a very happy new year. I hope if you can provide a comparison between accessing AF using the AF SDK and the new REST API. My application will be a mix of ASP.NET and GUI components from Kendo.

                                                       

                                                      Emad Radwan. Dolphin Energy Ltd.

                                                        • Re: Building web applications
                                                          dnoonen

                                                          Hi Emad. Happy New Year to you as well. I'm not sure if this reply gets you what you are after. If not, let me know and we can setup a discussion.

                                                          (1) AF SDK provides a .NET based access layer directly on top of AF & the PI Archive. As you are likely aware, it exposes a wealth of system access features and functions.
                                                          (2) The REST services we are building provide an HTTP/RESTful interface on top of the PI System. The REST services are bundled into a product family we are referring to as the PI Web API.
                                                          (3) The REST services we are building currently don't provide a one-to-one match of the capabilities exposed by the AF SDK. They currently provide a subset that we plan on evolving over time. It's difficult to summarize the differences in a short reply, but the services within the PI Web API currently support basic capabilities to read/write Time Series, Asset, and Event Frame data.
                                                          (4) The AF SDK provides client side binaries you develop against. Our REST services won't provide any client side componentry. Rather, all you need is the ability to send/receive HTTP in order to make use of our REST services.

                                                          There is a CTP available for one of the components within the PI Web API right now. If you are interested, you can either go to the Pre-Release section in the Download Center and grab "PI System Web API Core Services" or you can get back with me and I'll get you setup.  API documentation for this component ("Core Services") is embedded in the service itself and might answer some of your questions.  You can also review this blog post to get some more information on the PI Web API.

                                                           

                                                          Dan Noonen