+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Best approach to integrate other online applications with Sitefinity?

Best approach to integrate other online applications with Sitefinity?

9 posts, 0 answered
  1. Marko
    Marko avatar
    148 posts
    Registered:
    30 Jul 2008
    10 Oct 2008
    Link to this post
    What's the best way to integrate other online applications with Sitefinity, in order to take advantage of the already-defined Sitefinity templates (look and feel, navigation, etc.)?  For example, let's say you need this:

    - a relatively small database to store product information (let's say SQL Express or Access db)
    - an online form for entering new products
    - an online page for displaying (sorting, filtering) all products
    - the same look, feel, and navigation that exists in your Sitefinity-driven web site

    Now, let me first say that I've already had to do this once, and since I didn't have a lot of time to research the best approach, i just did it the fastest way I knew how:

    - I placed the standalone database into App_Data (Sitefinity site)
    - Created 3 custom user controls to add/edit/display data from the database
    - Added the user controls to Sitefinity list of controls
    - Created 3 regular Sitemap pages in Sitefinity Admin, and dragged and dropped my 3 custom user controls on each of the pages.

    However, the 3 user controls I built are really NOT going to be used on any other pages (they have a very specific purpose, obviously, to work with this specific database), and they really don't need to be reusable controls, like they are now.

    Although the solution I did there worked for the short term, I really wonder what is the best approach to doing something like this for long term.  Especially, if I start creating more and more of these specific web applications (which is likely to happen in my case).  What are my options?  Maybe the way I did it is the best way???  No?

    Thanks!
  2. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    12 Oct 2008
    Link to this post

    > - I placed the standalone database into App_Data (Sitefinity site)

    This certainly works.  In the past I've used the existing Sitefinity database.  Just add your own custom tables to this database.  As long as you don't touch the Sitefinity tables, I believe you will be fine.

    > - Created 3 custom user controls to add/edit/display data from the database
    > - Added the user controls to Sitefinity list of controls
    > - Created 3 regular Sitemap pages in Sitefinity Admin, and dragged and dropped my 3 custom user controls on each of the pages.

    Again, this works; but it sounds like you have admin-related functions for these controls (adding products, etc).  I would recommend creating a Custom Module to take care of these admin functions.  Then you can create UserControls for displaying this information publicly.

    Ivan wrote a 6-part series on creating a Custom Module here:

    http://blogs.sitefinity.com/Ivan/Tags.aspx?Tag=83d7830a-daf5-413e-b1ca-b1e3ced80d68

    Sitefinity MVP Joseph Guadagno also wrote about creating a Sitefinity Module:

    http://www.josephguadagno.net/Articles/1/Technical-Articles/9/How-to-create-a-Sitefinity-custom-module.aspx

    If you have question, please ask!

    Gabe Sumner
    http://blogs.telerik.com/GabeSumner/Posts.aspx

     

  3. Marko
    Marko avatar
    148 posts
    Registered:
    30 Jul 2008
    13 Oct 2008
    Link to this post
    Thanks for contributing, Gabe.  Here are some additional thoughts that I've had on this... Sorry for the long post, but I'm more or less thinking outloud here, evaluating different approached and playing devil's advocate to myself...

    So... I thought about creating a custom module for this sort of thing, but I guess I've liked the idea (so far), of keeping this relatively separate from Sitefinity.  All of these web apps would serve very specific, relatively independent purposes, as opposed to, say, Images & Documents, Lists, or Generic Content, for example, which are there solely to aid in the website content management.  In my case, on the other hand, these apps are more or less standalone--the only thing tying them together with Sitefinity is the need to maintain same look and feel with the rest of the site (which MAY very well mean that the best way to do this is, in fact, with Modules)...

    I guess the way I think of Modules is: a central place to manage something that's [potentially] used in many different places on the website (Generic Content and Lists are excellent examples).  But the little apps that I'm building will ONLY live on few, specific pages (including any admin pages), and will not necessarily need a "central" management location.

    Now, speaking of admin pages... So far, that one app I built using the procedure described at the top of the thread, had a couple of admin pages--and this is where sitefinity came in handy, because I could protect the pages by NOT allowing annonymous access for them, and assign specific Role(s) to be the admins for this app (which is another requirement I forgot to mention originally).

    But to build the admin page functionality itself, I had to build a couple of public controls, then drop them onto couple of new Sitemap pages.  The controls didn't really have any public properties--everything was handled through code--because they weren't meant to be "flexible" for reusal on many different pages (so why build user-manageable properties).  So, that's where I have a little concern with that approach--building public controls that are going to remain visible on the right-hand side of Sitefinity's list of usable controls, while in fact, they are only needed on a couple of specific pages.  [Of course, one dirty way of solving that would be too comment out these controls from web.config, once they are placed on the Sitemap page itself--but seems silly...]

    But then again, such is the case with many other out-of-the-box controls.  For example, navigation-related controls are only used in a few templates, and that's it.  They just sit there on the right, most of the time.  Some others haven't been used at all.  So maybe I shouldn't be concerned with running up the list of controls on the right???

    I guess, so far, I see my options this way:

    1. Build all functionality in public controls, then create new Sitemap pages and drop each control onto its respective page
        - PROS: code is almost entirely self-contained and potentiallly reusable in a different environment, should that ever become important; relatively quick and easy to implement
        - CONS: creation and addition of public controls that are really only used once

    2. Build custom modules to manage each of the new web applications PLUS build any public controls (non-admin)
        - PROS: public controls are kept to a minimum; Sitefinity API gets greater use (yay)
        - CONS: harder to implement; addition of a 'central' management tool for something that only exists in one place; Sitefinity API gets greater use (too much investment into Sitefinity, perhaps???)


    Anyways... those are some of my thoughts... I would appreciate any contributions to the discussion...  So you see any other ways of doing this, in addition to those 2 approaches described so far?

    One potential variation to #2 would be to build ONE SINGLE module to manage ALL future web applications (as oposed to, one module per custom app)...  This thought came to me just now, so I haven't given it much more [thought]... but what about that?  How difficult would it be to achieve something like that, considering the fact that the different web apps managed there would potentially be entirely different from each other?  That would mean different options/screens to manage, different permissions for each app, etc.

    Again, sory for the long post and all my ramblings here... Hopefully, others trying to do similar things will find this useful, too. ;-)
  4. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    15 Oct 2008
    Link to this post
    Hi Marko,

    Thanks for contacting us.

    In your case, you could create an Intra-Site module and that's a combination of the two ideas you had. This has three major advantages:

    1. You don't have to create a .aspx page for each user control. The Intra-Site module would load a user control based on logic in the admin area. This would also prevent running up a list of user controls when a user creates a page.
    2. For deployment, you don't need to add any toolbox lines to the Web.config because that code is contained in the module.
    3. It would look like an actual Sitefinity pluggable module and it would appear in the admin. This way, the module looks more like a part of the CMS itself.

    For more info on intra-site modules, please read this article. Feel free to contact us if you need further assistance.

    Sincerely yours,
    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Marko
    Marko avatar
    148 posts
    Registered:
    30 Jul 2008
    15 Oct 2008
    Link to this post
    Thanks.  I'm looking into intra-site modules right now.  Seems like a good way to go.  I'll check back if I have questions.
  6. Marko
    Marko avatar
    148 posts
    Registered:
    30 Jul 2008
    16 Oct 2008
    Link to this post
    Let me continue the discussion, after having looked at intra-site modules a little bit...  Again, sorry for the long post, in advance, but I'm still struggling to figure out a suitable approach for this sort of thing.

    So what I'm seeing is that, when developing modules, I still have to build controls for the public portion.  For example, if I am to have a page displaying "all products", I have to build a control that will reach into the database and pull out the needed records.  If I'm to have a public form for submitting new product information, I STILL have to build a control that will do that.

    Let me comment on the proposed advantages of the module approach (and play Devil's advocate, too):

    "1. You don't have to create a .aspx page for each user control. The Intra-Site module would load a user control based on logic in the admin area. This would also prevent running up a list of user controls when a user creates a page."

    >> I don't see how I don't have to create an aspx page for each control... For example, if I am to have a place for visitors to see "all products," a place to see product vendor information, and a place to submit a request for product info (submittable form),
    I then have to have three different physical places where people will go to view/do these different things--which means 3 aspx pages.  Right?  Because they serve very different purposes, but they are connected to the same database (part of the same sub application).  That's fine, but, I don't see how a module would change tha or help solve that better. 

    "2. For deployment, you don't need to add any toolbox lines to the Web.config because that code is contained in the module. "

    >> I suppose that's nice, but I'm not afraid of adding things in the web.config.  One way I'm adding things in web.config, while the other way, I'm adding things in code.  Either way, I end up with user controls placed on the right side of the "edit a page" screen. Not an advantage if you ask me.

    "3. It would look like an actual Sitefinity pluggable module and it would appear in the admin. This way, the module looks more like a part of the CMS itself.
    "

    >> This is nice too, but if the bulk of the functionality is for the public pages (viewing information and collecting information), then the admin portion (the one that would look like the rest of the CMS) is not the central focus here.  Why spend so much time building a module that has to follow certain rules and implement certain functions/interfaces/etc., if the logic needed to display a public "product info" page needs to be in a public control anyways?

    Let me give you a REAL scenario here...  The web application that I'm trying to build right now is relatively simple, in theory: a small database to store a simple listing of students and their contac info.  The database will have a web page where you can search the database of students, and a web page where students can fill out and submit their information in order to be "searchable".  Those would both be public, unsecured web pages.  Having an admin-only interface might be needed only for approving the submitted student data so that it would show or not show on the "search for students" page.  So the focus is on the public portion of this.

    Sorry if I seem distrustful at the idea of intra-site modules... I'm just trying to figure out whether it is too much work and hassle to build a module, if in the end I would be doing the same thing as I was doing before, anyways--creating public controls.  Please feel free to comment on any portion of what I said here.  I appreciate your input!




  7. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    17 Oct 2008
    Link to this post
    Sorry if I seem distrustful at the idea of intra-site modules... I'm just trying to figure out whether it is too much work and hassle to build a module, if in the end I would be doing the same thing as I was doing before, anyways--creating public controls.  Please feel free to comment on any portion of what I said here.  I appreciate your input!

    The advantage of an intra-site module is you're extending the native Sitefinity admin.  Your module would look like a natural "part" of Sitefinity.  It would not be readily apparent it was an "add-on".

    If you use pages, then it's probably noticeable your admin is something separate from Sitefinity's admin.  Perhaps it requires a new login and a special web address...

    This isn't bad.  In fact, it might even be good depending on what you want to accomplish.  It just depends on your needs. 

    For example, I once created a web site for training class registration.  When I got ready to create the admin section I started to re-create everything (my class search, class detail pages, etc) in a new "admin section". 

    It started to become obvious I was simply recreating everything I had already done and only making minor edits.  So I ditched that idea and simply rewrote my existing "consumer" pages to display "admin" options to users who had authenticated with admin access.  Meaning consumers & admins were using the same pages.

    It worked well for this scenario and prevented our training admins from having to "go somewhere else" to make their edits.  In other cases, however, I want my "add-on's" to look like a natural part of the Sitefinity Admin.

    So it just depends; if you and your clients are happy with UserControls & Pages for admin functions, then use them.  You're certainly not doing anything wrong.   Sorry if my earlier "module suggestion" led you down a bad path.  :)

    Gabe Sumner


  8. Marko
    Marko avatar
    148 posts
    Registered:
    30 Jul 2008
    17 Oct 2008
    Link to this post
    Thanks, that helps put things into perspective.  I don't think you've led me a wrong path initially.  I looked at those blog posts about modules and they made sense, but they seemed like overkill at the time.  If I'm going to do modules, I think intra-site makes more sense, in my case... But I guess I needed a more practical notion of when it is really desirable and appropriate to use [any kind] module, and I think this discussion definitely helped me.

    So, thanks Gabe and Joe! :-)

    I think for most of my cases, I would have relatively simple intra-site modules, but one thing that I will have to read up on some more, is how to do Permissions for intra-site modules.  I can envision these small apps of mine being relatively simple to manage (simple ControlPanel and CommandPanel), but being restricted to only certain roles in Sitefinity.  But I don't want to start asking too many questions about that yet, until I've had a chance to dig deeper into intra-site modules...
  9. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    20 Oct 2008
    Link to this post
    Hello Marko,

    It is in our plans to provide examples with permissions implemented in custom modules (both Intrasite and Pluggable). There are also several topics started in our forums :) We hope that we will be ready with these examples soon enough.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
9 posts, 0 answered