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:
/// Intializes the NolicsJobsProvider provider.
/// <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)
name = "NolicsJobsProvider";
this.application = ApplicationHelper.GetApplication(config);
//Upgrade the database to contain the current objects defined
//by the Nolics.net .dbclass files in this project.