News combit Dev Blog

Breakthrough for Web/Distributed Applications

Posted: Friday, September 30, 2016 | 0 comment(s)
 
Until version 22, there was a number of restrictions for web based projects. As the Web Designer is a single project file designer, all the glory that comes with multiple project files like project templates, table of contents and index and – most prominently – drilldown support were not available as they couldn't be designed.

This is going to boldly change in version 22 with the introduction of a virtual file system for LL.NET (Repository) that's available from almost anywhere where files could be selected in the "normal" desktop designer.

Once such a repository is available, you can choose to insert items from there or create new project files in the repository. The synchronization of this virtual file system then is done automagically by the implementor of the repository interfaces. We'll ship the product with a sample repository implementation for SQL databases, but you'll be free to write your own. That's also good news for anybody working with database stored project files. No more tedious fiddling with temporary check-outs from the database, temp files that need to be cleaned up afterwards and synchronization issues. Just write your own database repository, customized as you require it and profit from pure, stream based designing and printing.

From the code side, all you have to do is:

 using (var LL = new ListLabel())
{
    // Initialize a custom repository implementation which uses
    // a SQLite database to store the report`s files
    var myRepository = new SQLiteFileRepository("Data Source=...;Password=...");
     using (var importUtil = new RepositoryImportUtil(myRepository))
    {
        // Import an existing project from a local file into the repository
        // (a SQL database in this case) – this has to be done only once!
        // As no file paths are used when working with a repository, we get
        // an Item ID to reference the project within the repository.
        string projectId = importUtil.ImportProjectFile(LL, @"C:\Reports\Invoice.lst");
 
        // Tell List & Label which repository to use
        LL.FileRepository = myRepository;

         // And let the Designer load the imported project from the repository
        LL.Design(LlProject.List, projectId);
    }
} 

This code creates an instance of our sample SQLite based repository, imports an existing project file into it and starts the List & Label Designer.

Use the designer as usual but note the depth of integration of the repository. For example when adding an image, you get the choice to use one from the repository or import one from your local file system – this file will then be added to the repository as well, making sure other clients can still use the project as is without having access to the referenced local path.




And of course, you can create a drilldown report – choose an existing one from the repository or choose to create a new one that will automatically be added to the repository:


 

The interface you have to implement is quite simple:

public interface IRepository
{
    bool ContainsItem(string id);
    void LoadItem(string id, Stream destinationStream, CancellationToken cancelToken);
    IEnumerable<RepositoryItem> GetAllItems();
    RepositoryItem GetItem(string id);
    void DeleteItem(string id);
    void CreateOrUpdateItem(RepositoryItem item, string importUserData, Stream sourceStream);
    bool LockItem(string id);
    void UnlockItem(string id);
}  
This feature propels web and cloud applications to a new level and ensures feature parity with desktop applications.

 

 




Author: Jochen Bartlau
Head of Development List & Label

Jochen Bartlau leads the development at combit as Managing Director. He's a Microsoft .NET enthusiast driving innovation & agile project management. The mobile devices geek who used to be a physicist in his first life loves to spend his spare time with his family.


  

RSS
combit Development BlogRSS
What’s this blog for?
A place to share updates about the ongoing development of our products. General musings on the software industry included.
Archive
January 2021 (1)
December 2020 (2)
November 2020 (1)
October 2020 (2)
September 2020 (1)
August 2020 (2)
July 2020 (1)
June 2020 (1)
May 2020 (2)
April 2020 (2)
March 2020 (2)
February 2020 (1)
January 2020 (1)
December 2019 (1)
November 2019 (2)
October 2019 (2)
September 2019 (2)
August 2019 (2)
July 2019 (2)
June 2019 (2)
May 2019 (1)
April 2019 (0)
April 2019 (1)
March 2019 (1)
February 2019 (1)
January 2019 (1)
December 2018 (1)
November 2018 (2)
October 2018 (4)
September 2018 (4)
August 2018 (2)
July 2018 (2)
June 2018 (2)
May 2018 (1)
April 2018 (1)
March 2018 (1)
February 2018 (2)
January 2018 (1)
December 2017 (1)
November 2017 (2)
October 2017 (3)
September 2017 (3)
August 2017 (2)
July 2017 (2)
June 2017 (1)
May 2017 (2)
April 2017 (1)
March 2017 (1)
February 2017 (1)
January 2017 (2)
December 2016 (1)
November 2016 (1)
October 2016 (4)
September 2016 (5)
August 2016 (2)
July 2016 (2)
June 2016 (3)
May 2016 (2)
April 2016 (3)
March 2016 (3)
February 2016 (1)
January 2016 (2)
December 2015 (2)
November 2015 (1)
October 2015 (4)
September 2015 (5)
August 2015 (2)
July 2015 (2)
June 2015 (2)
May 2015 (1)
April 2015 (2)
March 2015 (1)
February 2015 (1)
January 2015 (1)
December 2014 (2)
November 2014 (1)
October 2014 (1)
September 2014 (2)
August 2014 (1)
July 2014 (2)
June 2014 (1)
May 2014 (2)
April 2014 (1)
March 2014 (2)
+1 800 256 3608 (toll-free North America only)