Results 1 to 10 of 10

Thread: Ultimate start for a VFPer!

  1. #1
    Member
    Join Date
    May 2013
    Location
    Bergkamen, Germany
    Posts
    33

    Question Ultimate start for a VFPer!

    I am a german developer who comes from VFP. So I apologize for my English in forehand ;-).

    For the past few days I have pored over the documentation, taken my first steps after videos and turned the forum inside out as best I could.
    I've seen very exciting things and I'm already looking forward to trying out all of these features. But before that happens, I still have a lot to learn and try.

    Of course, I want to do everything right from the start as Lianja's philosophy describes it. And that's when it starts to get difficult, as development with VFP already has a different structure. The result is that I don't really know where and how to start. To build a single page is not very helpfull. It's only a smal thing of th whole of it...

    There are many things that Lianja does for me, but in different places compared to a VFP program. For example, the start program here is probably the App Center, which already takes on general functionality with regard to users, rights, etc. But adapting the APP Center to my needs fails, despite the documentation. But that's just an example.

    I would like to verify once whether I have understood that correctly and clarify the first questions:

    In VFP I have a start program with which users log in and a program menu is set up in which everything from the application is accessible.
    From the developer's point of view, the database and common functionality from PRGs and classes can be accessed for everything in the application.

    In Lianja this corresponds to the App Center. All parts of my application are presented here as individual apps.
    An app can then contain n pages that I can control via an app menu.
    From the developer's perspective, the database that is available to all apps is already determined in the App Center? Where are my common functionalities from the PRGs and classes housed? Is it enough if I develop all the apps for it within one project?

    Data:
    In VFP I work with either the Foxpro database or an SQL database. So that I can decide freely without reprogramming, I do it there with cursor adapters.

    In Linja I read that I "simply" use virtual tables that are also based on cursor adapters. I want to be able to do this right from the start and I want to be able to test it.
    I imported my VFP database, which worked great. :-)

    Now I wonder

    1. How do I get this data into the Linaja SQL server?
    2. How do I then link my project with this database in order to create virtual tables from it?
    3. If I then use the virtual tables when developing the frontend, Lianja will probably take over everything again (cursor adapters?). But how do I address this data in my classes?

    Later on, questions about the front end will certainly arise, but these are not yet important.

    Have I understood everything correctly so far? Can someone answer my five questions in a way that a newbee can understand?

    Thank you all!
    Thanks
    Stefan

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    Hi Stefan

    There are lots of questions there. I’ll answer a few.

    An application is a collection of smaller apps.

    Apps can be published in the app center which displays a tile in the specified category.

    Apps can also not be published in the app center “Published” attribute, but can be switched to from another app using Lianja.openApp().

    The default database for an app is specified in the app attributes. In code you can access data in other databases using the database!table notation.

    So you break your application into smaller apps then you break an app down into pages and related sections.

    Everything starts with data.

    So you define the business rules tor your data and attach these to the columns. e.g validation, autosuggestions, choicelists, inputmasks etc. These are inherited by all the clients; desktop, web, mobile and the Lianja ODBC driver. So, even if you use ODBC with excell or powerBI these business rules are operational as are the roles and permissions for the authenticated users.

    Each database, table and column can have metadata associated with it. You maintain the metadata using the metadata editor.

    Each section in a page can be data bound to a native table, a virtual table or a sql query.

    When the table is opened the optional metadata for the table and its columns is applied to the section and formitems respectively. This is live, so if you change the metadata of dictionary business rules the UI inherits these. You don’t need to do this manually.

    I’ll answer other questions in another post.
    Last edited by barrymavin; 2020-11-24 at 09:13.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    So let’s talk about virtual tables in Lianja.

    Firstly... Virtual tables have a connection string. This can be an ODBC connection or the special connection called “local”.

    Local connections can be used during development.

    Local connections can call stored procedures on the client (as opposed to executing stored procedures on the server). In other words, you can use LianjaScript (VFP code) to combine data from MSSQL and/or MySQL

    In an app when it runs you can override the connection string. In other words you can switch from “local” connections to remote connections.

    Prior to 5.6 relating sections that are bound to virtual tables required a small amount of coding (we call this LoCode) in the parentdatachanged section delrgate. In 5.6 and above section relationships with virtual tables is the same as using a native table.

    So, build your apps using “local” virtual tables and switch the connection string if you feel the need to use virtual tables. But first ask yourself why you do not just use native Lianja tables.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Member
    Join Date
    May 2013
    Location
    Bergkamen, Germany
    Posts
    33
    Thanks, barrymavin, for your detailed answers. :-)

    Only thing I hve to answer right now is your question about not using native lianja tables.

    Am I right, that native lianja tables is a file database, like the VFP databases as well? Therefore we want to switch to an SQL system.

    File based databases
    - are very vulnerable when used on Windows servers of newer generations (backup systems, index errors, etc.)
    - don't get along very well with SMB and OpLocks
    - are unsafe against data theft as they are not encrypted. Copying files is enough.

    SQL server
    - are isolated from the rest of the program
    - are safe because not all data is available.
    - Complies with the European GDPR due to data security and data consistency

    Please contradict me, if I'm wrong.with an aspect .
    Thanks
    Stefan

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    All databases are insecure if your login details are exposed.

    How you protect access to your IT servers on premises or in the cloud requires proper planning.

    If you are concerned about these things then use a server. Whatever that may be.

    All databases use indexes.

    The Lianja database engine has several fault tolerant features.
    - Automatic index healing if index inconsistencies are detected
    - Is cluster aware auto detecting network and node failure
    - is running at some large banks for over 15 years with virtually zero downtime.
    - So in fact, no it’s not exactly the same as VFP as it’s cluster aware.

    Yes you need to properly configure your LAN / network
    You can encrypt Lianja tables if you feel it necessary.
    Many database servers still store individual tables as files
    You can build apps using “local” virtual tables and switch to another database server later. I’m a believer in keeping things as simple as possible during development.


    I would consider building all new apps as cloud apps anyway as this resolves much of your critique and is more secure.
    Last edited by barrymavin; 2020-11-24 at 19:01.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #6
    Member
    Join Date
    May 2013
    Location
    Bergkamen, Germany
    Posts
    33
    Hi barrymavin,

    Thank you for your answer. That of course makes me think about it again. I pretend to be extra stupid to be open to everything. I would like to discuss what is good and safe for us, if I may?

    In our application we have e.g. Currently 260 tables. Of course, I don't know yet, how many there will be in the new application, but the trend is increasing.
    Our largest table has over 3.5 million records.
    Our main work form has data from 18 tables, including our largest.

    We have Windows servers 2019, including virtual servers. We have up to 12 workstations in the LAN. Nobody works remotely and if so, then via Teamviewer on a client PC.

    Securing the server and its drives in such a way that nobody form outside or inside, except me as the admin, can access the data is not the problem. I'll leave that out and discuss it with our technical server admin ...
    A connection of the application to the data is also possible with UNC paths so that I don't have to connect any drives?

    How, with which technology in Lianja, can I get the following points best:

    - Encrypt the data so that nobody can do anything with it if a backup is stolen. Is encryption and decryption data time relevant for an App? Can you also save the connection strings encrypted? Does a Lianja database itself have the option of access only with a password?
    - What exactly does cluster capable mean in this context? How can I use this?
    - How do I use Lianja to ensure that data is not changed by multiple users via Apps at the same time. Is Lianja doing this itself in the background?

    I also consider development with "local" virtual tables to be the best solution.

    Since I don't want to import my VFP application, but rather create it from scratch, I want and have to redesign the new database.
    Are there any tools in Lianja that I haven't discovered yet? I don't mean the functionality to create databases an tables... The existing design (not by me) dates back to the 90s, in which the bare tables were accessed directly without buffering.
    Due to the sometimes large tables, a high-performance speed is not given in this design.

    Do you have a tip, suggestion or hint as to which tools I can use to design my new database? The goal is always to move as little data as necessary over the LAN and only have this particular data available for processing a certain task.
    In VFP I do this with cursor adapters and "? Parameters".

    Thank you in advance for your trouble. :-)
    Thanks
    Stefan

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    Hi Stefan

    1. The Lianja database engine (both navigational and SQL) is embedded in the desktop app builder, app center (runtime), cloud server and sql server. It is a high performance multi user database. Concurrent CRUD operations are handled as in any other SQL database. Lianja uses optimistic locking when updates occur with before and after image buffers. The locks are applied only at the time of the operation resulting in reduced lock queues and best performance.

    2. Don’t forget Lianja also runs exceptionally well on Linux.

    3. Don’t forget that Lianja cloud server can be used in a docker image. Why is this a good thing? Because you can move that docker image onto your own server, into AWS or into azure... and others.

    4. Unless you want to configure high availability with 10000’s of users the clustering capability will be of no interest to you. It essentially allows a group of front end servers (the application servers) to communicate with two or more backend database servers via a virtual IP address. At any one time one database server is the master. Data is replicated in real time between the master and the backup database servers. If the master fails for whatever reason (hardware failure of any sort) the slave takes over by becoming an endpoint for the VIP. Data is now maintained on the backup server until the master is repaired and rebooted. At this point data from the backup that has changed is automatically synced back to the master which reassigns the VIP and continues operation. The clients are unaware that this has occurred and continue oblivious to the backend database server issue. This is currently Linux specific. If you ever need it contact us and we can help.

    5. I recommend you look at building web apps which will run in the browser on all operating systems.

    6. you have all the tools in Lianja to design your database, attach business rules and metadata. What are you missing?

    7. as with any sql database, having indexes on important columns will help performance. Lianja has a decent sql optimizer that will query in huge tables with high performance if it finds an index to optimise on. It also has some interesting built in functionality such as case insensitive indexes and case insensitive comparisons. This is how most SQL databases operate. Removing the need to upper() or lower() all over the place.
    Last edited by barrymavin; 2020-11-25 at 05:28.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Member
    Join Date
    May 2013
    Location
    Bergkamen, Germany
    Posts
    33
    Quote Originally Posted by barrymavin View Post
    Hi Stefan


    6. you have all the tools in Lianja to design your database, attach business rules and metadata. What are you missing?
    Hi again,

    thank you for all the information. You have helped a lot. :-)

    Of course, I don't miss anything in Lianja for the technical creation of a database. The question was more in the direction that if I am already designing something completely new, a visual tool would be very helpful, in which I can "wildly" display all tables, link them and move table contents back and forth in order to achieve a better division of fields and relationships of tables with one another than it is now.


    Other thing:
    How can I make virtual tables out of a lianja native database to use them in my apps? I only found vreating vtables out of extern databases...
    Thanks
    Stefan

  9. #9
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    Hi Stefan,

    Create local virtual tables from an existing database
    https://www.lianja.com/doc/index.php...ote_Deployment

    I don’t want to say too much but there’s a visual relationship builder coming in Lianja 6.0 but this will not be available until Q1 next year.
    Last edited by barrymavin; 2020-11-25 at 06:46.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  10. #10
    Member
    Join Date
    May 2013
    Location
    Bergkamen, Germany
    Posts
    33
    Quote Originally Posted by barrymavin View Post
    Hi Stefan,

    Create local virtual tables from an existing database
    https://www.lianja.com/doc/index.php...ote_Deployment

    I don’t want to say too much but there’s a visual relationship builder coming in Lianja 6.0 but this will not be available until Q1 next year.
    Hi barrymavin,

    Q1 next year there are only a few days left: cool:
    Last edited by zehnernet; 2020-11-25 at 09:23.
    Thanks
    Stefan

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us