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

Forums / 3.x Pre-release forums (retired) / Custom Modules and Nolics.

Custom Modules and Nolics.

5 posts, 0 answered
  1. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    24 Nov 2006
    Link to this post
    Hi Telerik,

    No problems from me this time.  I just have what I hope is a small query as I don't want to take up too much of your time.  I have been testing out using Nolics 2005 with the trial and it seems fairly straight forward to use.  I have been creating some sample usercontrols to test with it in the hope that I can use it with Sitefinity.  Now the question I have is to do with the Nolics Dataconnections section of the web.config that you have set up.  Is there a Telerik class that I can import into my projects to initialize my dbclasses with, or any other way to reuse that section you have in the web.config...

    I am sorry if it is a simple question and I am being dumb but any help you can give me on this matter would be appreciated.

    Thanks
    Sean
  2. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    26 Nov 2006
    Link to this post
    Hi Sean,

    Your question requires a circumstantial answer which I can’t give in a single post.

    We are working on a sample module (Jobs) that will ship with Sitefinity with full source code and step by step tutorial on how to create it using Nolics. It will also cover things like Data Provider Model, Controls, Property Editors, and Administration Panel.

    Of course you are not required to use the same provider model nor Nolics. If you want to start now using Nolics I suggest you to use their tutorials and do not try to tie down your module with Sitefintiy. You can do this later with fairly little work.

    Just to give you an idea you can use the NolicsHelper class to initialize database connection. The class is located in NolicsHelper assembly. This name is misleading as this assembly is not part of Nolics distribution and we will probably refractor the whole namespace. So be aware of that!

    Here is an example: 

        /// <summary>

        /// Intializes the NolicsJobsProvider provider.

        /// </summary>

        /// <param name="name">The name of the provider. If name is null or empty, the name of the NolicsJobsProvider is used.</param>

        /// <param name="config">The NameValueCollection from which the information is obtained.</param>

        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)

        {

          if (string.IsNullOrEmpty(name))

          {

            name = "NolicsJobsProvider";

          }

          if (string.IsNullOrEmpty(config["description"]))

          {

            config.Remove("description");

            config.Add("description", Messages.M0000);

          }

          base.Initialize(name, config);

     

          DataConnection.Initialize(false, typeof(Job).Assembly);

          NolicsHelper.SetConnection(config["connectionStringName"]);

     

          this.application = ApplicationHelper.GetApplication(config);

     

          config.Remove("name");

          config.Remove("connectionStringName");

     

          //Upgrade the database to contain the current objects defined

          //by the Nolics.net .dbclass files in this project.

          NolicsHelper.UpgradeDatabase(OdbDataProvider.DefaultProvider(null), Assembly.GetExecutingAssembly());

        }



    Kind regards,
    Bob
    the telerik team
  3. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    26 Nov 2006
    Link to this post
    Thanks Bob,

    No need for further explanation at this stage thanks.  You actually hit the nail on the head as this was just what I was looking for. I did stumble on this code by using Lutz Roeders Reflector, but then couldn't find it again.

    But yes I agree you would probably need to rename the Helper or at least make it part of the Telerik namespace so it is easy to tell it doesn't belong to Nolics but it acting as a bridge between the 2.

    I will be wary of you changing the namespace, thanks for the warning.

    Thanks.
    Sean
  4. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    27 Nov 2006
    Link to this post
    Hi,

    I have another quick question regarding Nolics.  It is to do with Licensing.  I am currently testing Nolics out using the trial version and I would definitely like to be able to use it to create custom modules within Sitefinity.  I noticed that I couldn't compile the dbclass files until I had registered the Trial version.

    Now you mention in the Developer Documentation that Sitefinity includes an OEM license to use Nolics, so does this mean that when Sitefinity goes to full release we will be given a license that will allow us to compile Nolics classes for use with Sitefinity?  Or how will it work, I would just like to know for planning purposes as to how I develop my modules.

    Kind Regards
    Sean
  5. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    28 Nov 2006
    Link to this post
    Hello Sean,

    Sitefinity will come with OEM license for Nolics that will allow you to make modules for Sitefinity using Nolics tools. But if you want your module to operate as a standalone application as well, or use the tools for other purposes, you will need to obtain a separate license from them.

    Best wishes,
    Bob
    the telerik team
Register for webinar
5 posts, 0 answered