DriveSoftwarePublisher | Software Publisher using Google Drive | Developement update #2

in #utopian-io6 years ago (edited)

Repository

https://github.com/adsau59/DriveSoftwarePublisher
Commit

What is DriveSoftwarePublisher?

DriveSoftwarePublisher (DriveSP) is a software publishing software that uses Google Drive.

Ever wanted to send your software your client but you can't afford a to hire a server? with DriveSP you can use google drive to version your software.

Objectives

  • Help programmers and software developers who have very low budget publish their software easily.
  • Help open source developers to publish their software without any investment at all.
  • Quick way to publish software.

Demo video

Technology Stack

DriveSP is made using

  • C#, .NET Core
  • Drive REST API
  • Docopt (Command Line API)
  • Newtonsoft Json (JSON framework for .NET)

New Features

DriveSP is ported to .NET Core 2.0 from standard .NET for it to be compatible with Linix Based OS and MacOS.

Why?

  • As this software is intended for developers and clients, I think it should be available to on all Operating systems so that it is accessible to everyone .

How?

  • In order to port it, I recreated the project in .NET Core and imported all the scripts from the previous project and libraries it needed into the new one.
  • Then I did some testing to see if there are any bugs.

Code is re written to be more object oriented from before.

Why?

  • I started this project almost a year back but left its development in between, but as I realized this project could help many low budget developers I continued developing it.
  • Most of the code I wrote back then was functional, which became very tedious to add new feature; so I decided to change up the code to be more object oriented so that I could easily add new features as needed.

How?

  • I identified different classes and created a rough class diagram for the software.
  • After I implemented it into the code, I copied the functional code into their respective classes and converted most of the variables from parameters into member variables.

In Publsiher,

In init command, initialize without VersionName

Why?

  • Initializing a new project doesn't relate to increasing version, so I seem better to separate both.

How?

  • When a project is initialized, its VersionCode is initialized to 0 and a version cannot be updated with VersionCode 0 hence upversion has to be executed to change its VersionCode to 1.

Created drop command, delete a version which is on drive.

Why?

  • Deleting an version update from drive was very tedious, hence an inbuilt way to delete it was needed.

How?

  • Thanks to oop, version was delete simply by using the Drive FileID of the version and calling an api call with it.

Created setversion command, set to target version by specifing VersionCode and VersionName, use --force option to set even if the target version exists on drive

Why?

  • Due to the addition of drop command, gaps in version code was created, for example, suppose there is version 1,2,3 of the software and version 2 was deleted, it made a gap between version 1 and 3 so in order to fill that gap, setversion could be used to target that version and upload a new versoin for it.

How?

  • Current version is stored inside ConfigJson, so simply checking if the version exists and if not updating the ConfigJson did targeted the specifed version.

In push command, created force option to delete the existing version on drive with same, VersionCode that is being uploaded.

Why?

  • pushing something incorrect happens all the time, hence to by using force option with push command, deletes the previous uploaded version with the same version code and uploads the new one.

How?

  • if force is used with push, it simply deletes the version if it already exists.

Created pushnow command, increase version and push by just one command.

Why?

  • Increasing the version by using upversion and then pushing it just felt like too many steps for a simple thing.
  • So a single command that does both with optional VersionName made pushing very simple.

How?

  • pushnow just calls upversion (with timestamp as VersionName if not given) and push method.

Created showversions command, Display all the versions on drive.

Why?

  • Not being able to see the uploaded versions created uncertainty, whether a version is upload, deleted etc

How?

  • The Project class has a list of version, which I used to just print out all the versions that is on drive.

In Updater,

In install command, VersionName or VersionCode now either can be used to target install version.

Why?

  • Adding option to use VersionName to install software added flexibility for the users.

How?

  • Along with a search with VersionCode, a search with VersionName is also done in install method.
  • VersionName is made to be unique now as multiple versions with same VersionName added complexity to the program.

Created checkupdate command, check if new version is available.

Why?

  • CheckUpdate method is one of the very first step for 3rd party to integrate DriveSP into their program itself for checking if update is available to give users a prompt and updating their software from their software itself.

How?

  • Simply comparing the current VersionCode in Config with the latest version on drive, and print response according to it.

Created showversions command, Display all the versions on drive.

Why?

  • Not being able to see the uploaded versions created uncertainty, whether a version is upload, deleted etc.

How?

  • The Project class has a list of version, which I used to just print out all the versions that is on drive.

Roadmap

Development plans of DriveSP can be viewed on the Trello Board.

Phase 1: (COMPLETED)

  • Create DriveSP Prototype with basic Publisher and Updater commands

Phase 2:

  • Port to .NET Core (COMPLETED)
  • Add Features:
    • pushnow commnd in Publisher, increase version and push with one command (COMPLETED)
    • drop command in Publisher, delete a version from the drive (COMPLETED)
    • showversions command, show versions on the drive (COMPLETED)
    • target install version with either version code or version name (COMPLETED)
    • checkupdate command, check if new version is available (COMPLETED)
  • Test on Linux, haven't done it yet as I have to install virtual machine for that, will do it by next development update.
  • Text on MacOS (Will have to find a way to test on MacOS as I dont own a Mac)

Phase 3:

  • Error reporting system, report errors using google drive.
  • Change log system, add changle log in version update.
  • Add Feature:
    • Add ability for 3rd party application to check updated and perform update automatically.
    • getupdater with OS option, to send the updater to clients with specific OS.

How to contribute?

You can contribute this project by,

  • Using the the software and creating issue when any bug is encountered.
  • Helping me in the development by bug squashing or developing new features. (If you want to do this, contact me so that we can collaborate.)
  • Let me know if you have any good feature ideas.

Before creating issues for bugs, or suggesting new feature ideas, check out the Trello Board if it is already been found/suggested.

Contact

If you have any problems or you want to contact me for feature ideas or want to collaborate in development you can contact me on DefineX Community discord server

GitHub Account

https://github.com/adsau59

Sort:  

Thanks for the contribution, @adam-saudagar! It's a great post with a lot of information - definitely an improvement over your previous one! A few thoughts:

  • You added all the features in one commit - not a good idea! It would be much better if you created a PR for each feature, with separate commits for each PR, and linked them instead. Currently it's hard to see which feature was implemented when and where, because it's all bundled together.
  • Sort of the same as above, but the commit has 29,705 deletions! A large part of this is more than likely not relevant to your contribution, so you could've created a separate commit/PR for this and not included it in the contribution for example.
  • The line width is pretty large in places. I think if you use ReSharper it should automatically wrap the lines that are too wide (but I could be wrong).
  • It's good that you add comments to your code, but sometimes I feel like it's a bit too much. For example I think this is already pretty clear without a comment
else if (docopt.Get("showversions").IsTrue)
{
    //show all versions in the project
    publisher.ShowVersions();
}
  • As I mentioned the quality of your contribution is good, but if you want to get the highest score then I would definitely recommend checking out a contribution like this one for example (the difference in score for the two answers is not large at all, so no pressure!).

It's a cool project born from a great idea, so I look forward to seeing more!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hey @adam-saudagar
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Congratulations @adam-saudagar! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.26
TRX 0.25
JST 0.040
BTC 92903.81
ETH 3331.70
USDT 1.00
SBD 3.29