Jump to content
Steve Maughan

Integrating GIT into a Delphi Application?

Recommended Posts

My application manages sales territory alignments e.g. zip code "32779" is assigned to territory "T164". Typically many people want to access and make changes to these assignments. For example, the manager on the west coast may want to dissolve a territory, and a manager on the east coast may want to expand a territory. It seems to me this is akin to version control. This being the case I've been thinking that Git could be used to manage the alignment version control. For this to happen I'd need my application to be able to access all the functionality of Git: commit, pull etc.

 

Has anyone done this before? Are there any Delphi Git components or tutorials? Would I need to distribute a copy of git - I assume I will?

 

Steve

Share this post


Link to post

There is no official API AFAIK. But you may just as easily call the command line for git itself. Refer to the porcelain and plumbing of git for more information. And of course you would have to distribute a copy of git.

Share this post


Link to post
12 minutes ago, David Heffernan said:

Doesn't sound very much like dvcs is what you need. Sounds more like a central database is what you need. 

What's your thinking?

 

Potentially a company will want distributed people working on their part of the alignment. They may experiment locally themselves with different alignments before committing to the main alignment. They'd also like to be able to rollback changes to see what the alignment looked like at a specific date. To me this seems akin to software development.

 

What am I missing that a central database would provide?

 

Thanks - Steve

Share this post


Link to post

I would have imagined that you'd want some coordination, not everybody having their own copies, all different. Also, git in particular, and dvcs in general are very complex. You sure you want to throw that at your users. But hey, what do I know about your needs. Nothing. 

 

If you want to use git then go ahead. For instance with libgit2. 

Edited by David Heffernan
  • Like 1

Share this post


Link to post
22 minutes ago, Steve Maughan said:

Potentially a company will want distributed people working on their part of the alignment. They may experiment locally themselves with different alignments before committing to the main alignment. They'd also like to be able to rollback changes to see what the alignment looked like at a specific date. To me this seems akin to software development.

Given how many developers have got problems understanding how a distributed version control system works, I doubt that non technical people will understand it.

 

And given how many times I personally had problems resolving git oddities (probably due to my own limited understanding of it), I doubt that you will do yourself a favor implementing this with git.

 

This will most likely become a support nightmare, especially in my experience with the attitude of sales people towards IT and software developers. (They regard them lower than plumbers because in contrast to sales who earn the company lots of money IT only costs the company money and gets always into the way.)

Edited by dummzeuch
  • Like 1
  • Thanks 1

Share this post


Link to post
Guest
2 hours ago, David Heffernan said:

Doesn't sound very much like dvcs is what you need. Sounds more like a central database is what you need. 

I wanted to type; i would go with a good RDBMS and "SQL-logging". I.e you put up triggers to log changes in focused tables.

So i agree with David. SVN/GIT does not feel like the way to go here.

Share this post


Link to post

It would make sense only if your data consist in text files, and you want to keep versioning of the information.
A regular SQL database would replace the old data, so you would need to log the old values in a dedicated table.

 

You can use the git command-line for all features you need.
Just call it with the proper argument from your Delphi application.

 

But I would rather take a look at https://www.fossil-scm.org/home/doc/trunk/www/index.wiki
It is an efficient Distributed Version Control Management system, very similar to git, but with a big difference:

"Self-Contained - Fossil is a single self-contained stand-alone executable. To install, simply download a precompiled binary for Linux, Mac, or Windows and put it on your $PATH. Easy-to-compile source code is also available"

So you could be able to much easier integrate it to your own software.
It has some other nice features - like an integrated Web Server - which could be easy for you.

Here also, you would need to call the fossil command line from your Delphi application.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×