Project Free HRD & Payroll Application

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

One more thing I missed to mension:

To make sure data connectivity between 3 DBFs you should execute procedures of REORGINIZE INDEX and DATA INTEGRITY CHECK from File Menu.

Thanks.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

Roberto Lopez wrote:

In the case that you want to start with a simple design and later make the changes to evolve towards a client/server scheme, my advice is that you do a little effort now, to save hundreds of programming hours in the future.

I mean: You could use dbf files with standard commands on your app, but you should 'encapsulate' data handling in functions, that could be easily changed without impact your client application.

Imagine that you are working in an append data form, then:

<START GUI CODE>

.....
.....

ACTION-> APPEND_RECORD_001(file,data_01,data_02,data_03)

...
.....

<END GUI CODE>

FUNCTION APPEND_RECORD_001(file,data_01,data_02,data_03)
.....
.....
RETURN

Later, if you decide, to go to MySql, you should only recode the APPEND_RECORD_001 function and (IMHO) store it on the server for remote execution.
Noted... Next, I will separate template windows from DBF handling.

Thanks.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Project Free HRD & Payroll Application

Post by Roberto Lopez »

Agil Abdullah wrote:
Noted... Next, I will separate template windows from DBF handling.

Thanks.
A little more advice:

You must start to think in terms of 'recordsets' and not 'live' data (as in browse or data-grid).

Your functions to get data from dbf files, must return an array, and then (in the GUI side of your app) load a grid with it.

Just think in the process of 'googling' something.

The user should start with a 'blank' grid. When he clicks an 'update' or 'reload' button, then you invoke your query function (with the parameters required according user's requirements).

The 'blank' thing is for simplification, of course, you could load a predefined query at start.

This scheme could easily ported to work with a SQL server.

It's difficult to think this way, if this is your first time, but the benefits are enormous.

I've ported one of my apps, to work this way. In this case, the remote data server is NETIO, so, the things were easier.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: Project Free HRD & Payroll Application

Post by jayadevu »

Hi Roberto,

You seem to have done a lot of work with NETIO.

Where can I get some working example of accessing DBF using NETIO, browse, update etc.

Can we use it in WAN also ?

Warm regards,

Jayadev
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Project Free HRD & Payroll Application

Post by serge_girard »

A question to Roberto:

How exactly one calls 'server stored procedures' in HMG?

Thanks, Serge
There's nothing you can do that can't be done...
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

Roberto Lopez wrote:

A little more advice:

You must start to think in terms of 'recordsets' and not 'live' data (as in browse or data-grid).

Your functions to get data from dbf files, must return an array, and then (in the GUI side of your app) load a grid with it.

Just think in the process of 'googling' something.

The user should start with a 'blank' grid. When he clicks an 'update' or 'reload' button, then you invoke your query function (with the parameters required according user's requirements).

The 'blank' thing is for simplification, of course, you could load a predefined query at start.

This scheme could easily ported to work with a SQL server.

It's difficult to think this way, if this is your first time, but the benefits are enormous.

I've ported one of my apps, to work this way. In this case, the remote data server is NETIO, so, the things were easier.
That's another point I need your guidance. I'll try first then you tell me which ones need revision.

Thanks.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

jayadevu wrote:

Hi Roberto,

You seem to have done a lot of work with NETIO.

Where can I get some working example of accessing DBF using NETIO, browse, update etc.

Can we use it in WAN also ?
1+
Same-same
"Sama-sama" :)
"Sami Mawon" :)
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

Serge_girard wrote:

A question to Roberto:

How exactly one calls 'server stored procedures' in HMG?
+1
Same-Same
"Sama-sama" :)
"Sami Mawon" :)
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

Hi all,

To understand what required by Rathinagiri, Serge, Mustafa, Roberto Lopez (to name a few), permit me to share an article related to it.

This is note for beginners to Client-Server Application, including me.

Understanding Client-Server Applications -- Part I Publish Date: Oct 20, 2011
By National Instrument (NI.com) ----> http://www.ni.com/white-paper/4431/en/

Overview

Learn the basics of client-server applications and how to develop them. In this Part I of our series on Understanding Client-Server Applications, we discuss the fundamentals of client-server applications, and explore a simple temperature monitoring application to help you understand what you need to consider when creating a client-server application. In Part II, you learn how to develop code samples from scratch as we discuss technologies to speed this process.

1. What is a client-server application?

Client-server describes an application architecture in which the client requests an action or service from the provider of service, the server. Consider a Web browser and a Web server. When you address a URL in the browser window, it (client) requests a page from a Web server. The server returns an html page to the client, which parses the page (data) and displays it on your computer.

When developing a client-server application, like the Web browser and Web server, you need to consider how you are going to handle developing your application in a team environment and how you are going to handle long-term maintenance. Developing client-server applications parallels developing modular programs. Modular programming separates large applications into smaller constituent pieces to ease development in teams and provide better maintainability. In a client-server application, a module does not have to be part of the same program or even run on the same computer. Each modular function can run on a different device.

2. How does a client perform?

Client programs request service from a server by sending it a message. Referring back to the Web example, a Web browser is a client we use everyday to request Web pages. For example, when you clicked the link to read this article, your browser sent a message to a Web server in Austin, TX. In response, your browser received the html page you are now reading. A Web browser represents many client programs, which manage the graphical user interface (GUI) or display portion of an application; determining the presentation of the service provided by an application.

3. What is a server's function?

Server programs process client requests by performing the tasks requested by clients. For example, in a Web browser the Web server returns the html page requested by the client. But client requests and server programs are not always so simple.

<continued>
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: Project Free HRD & Payroll Application

Post by Agil Abdullah »

<continued from previous>

Consider a more complicated application in which you buy a product on a Web page. In this case, the client informs the server what you are purchasing and the server updates a database with the purchase request. Then, the server informs the client that the order has been placed.

Servers are generally passive as they wait for a client request. During these waiting periods servers can perform other tasks or perform maintenance. Unlike the client, the server must continually run because clients can request service at any time. Clients on the other hand only need to run when they require service. Many server applications allow for multiple clients to request service. For example, while you are reading this page others interested in client-server programming could also request and read the same Web page.

4. Designing a Temperature Monitoring Application

With a basic understanding of client-server applications, how do you implement this technology for your needs? We touch on a simple application of acquiring temperature readings from a thermocouple. First we break this application into three modules making the project easier to develop and maintain. The first module acquires the readings from the thermocouple, the second module analyzes the raw data and relates it to temperature, and the third module provides a graphical user interface or display. Each module must provide data in a format that is understood by the next module.

After dividing the project into manageable pieces, you have a couple of options. You can write one program to perform all three of these functions on the same computer, or you can distribute the process over multiple machines by running each of the individual routines or functions on different machines. At this point, you need to consider your goals. For example, you may need a client-server architecture if you must access the temperature remotely from a different computer than is collecting the temperature data. In this situation, you can create an architecture in which one computer acquires and analyzes the data and another computer or client queries the data to display it. Figure 1 illustrates how the client and server interact.

The actual architecture of the application depends on your particular needs. If you are acquiring a large number of data points, it may be better to run the acquisition and analysis modules on separate computers. Thus the display client would request the temperature from the computer processing the raw data, reducing interruptions to the data acquisition process.

5. Server Considerations

In a temperature monitoring application there are certain considerations for designing the server. These include:

• Is there more than one client?
• Are multiple clients served one-at-a-time or simultaneously?
• Are different clients prioritized or treated differently?

In the simplest application, only one remote client requests the temperature from the temperature acquisition computer. In this case the server waits for a request and returns the temperature to the requesting client.

<continued>
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
Post Reply