Jump to content

Recommended Posts

Posted

I'm new to computer programming but I thought I'd have a summer project now exams are finished. Which language is the best to develop a data input program for work. Which language would be the best to have a tick box for people people to click and submit once they've made an equipment check. The time gets logged on a database with time and date and there is an interface so other people at work can look and see what equipment has to be checked for that day. There is a computer system with multiple computers on the same account so it will have to support multiple users. I guess there should be a refresh button everytime someone wants to check. It also needs to have an input and delete function so users can delete and add checks that need to be checked. How hard is this? What programming language is the best?

Posted (edited)

Whatever your web server is running. It is as simple as an update command.

 

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "databasename";
$equipmentname= $_POST['equipmentname'];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$sql = "UPDATE datebasename SET date='". date("Y/m/d h:i:sa")."' WHERE equipment='".$equipmentname."'";

if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}

 

$sql = "SELECT id, equipmentname,date FROM users WHERE date=".$date."";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row where the equipment was checked today
echo "equipment checked today"
while($row = $result->fetch_assoc()) {
echo " equipmentname: " .$row["equipmentname"]."time checked".$row["date"]."</br>";

}
} else {
echo "0 results";
}

$sql = "SELECT id, equipmentname,date FROM users WHERE NOT date=".$date."";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row where the equipment was checked today
echo "<br>equipment not checked today</br><form method=post>"

while($row = $result->fetch_assoc()) {
echo " equipmentname: " .$row["equipmentname"]."time last checked".$row["date"]."<></br><input type=hidden name=".$row["equipmentname"]." value=".$row["equipmentname"]."><input type=submit value=checked>";

}
echo "</form>"
} else {
echo "0 results";
}

$conn->close();
?>

Edited by fiveworlds
Posted

Well, most languages have the capability to do what you're describing. I think it'd most easily be implemented as a web application that the users can access through their web browsers (IE, Chrome, Firefox, etc). Again, most languages have web development frameworks, so that's not a good criteria either.

 

Firstly, you'll want to set up a web server, which is like a remote computer that stores the pages of your web site as files, and can be accessed remotely. Like your computer has an IP address, so does the web server, and they're reached by the IP's or domain names like mysite.com or site.net (which really map to the IP addresses). On the server you can install the programming languages and frameworks you'll want to use and write the project there.

 

I think you'll also want to use a database system, which is like a programming language, but specifically for the purpose of storing and manipulating data. The most popular, and probably good to start with, is SQL, which stores data in tables of columns / rows, like an excel sheet. You can set up the database on your server (by downloading, say, MySQL), and set it commands like

SELECT registration_date FROM users WHERE name="bob46"

To make the front-end, that is what the users see, you'll need to use HTML and CSS, and maybe Javascript. HTML is what you mark up the content of your website with, so as to structure it into types and sections, and CSS is how you style the HTML-structured web page (colours, fonts, sizes, positions). When a page is loaded from a website, the web browser recieves all of the code, reads it, and turns it into text, boxes, shapes, colours, and everything that you see. Javascript lets you do some computation and processing, more than just affecting appearance, directly in the browser, but that shouldn't be your initial concern.

 

Then, to do the backend, where you handle requests for information and updates to the database, and do calculations that will be returned to the actual page, and everything to that effect, you'll have to use a programming language/web app framework. Here are some possibilities:

 

PHP - if you want something with a gentle learning curve with which you could build your program quickly. PHP was developed as a web framework exclusively, and though it has tried to shed that shell, it isn't ideal for most other kinds of software.

 

Python (Flask or Django) - if you want to work with a general purpose language that will likely be applicable to any program you want to make in the future. It is fast, modern (in terms of programming language features), and used from robotics to finance to web development. Flask and Django are its web development frameworks. The learning curve for Python itself is gentle, but fully grasping all of its features and the frameworks will require a tad more effort.

 

Ruby (Rails) - if you want to work with a very modern and able web framework (Rails), for which the base language (Ruby) can be used as general purpose. Ruby is like Python, but has a steeper learning curve and is a little less powerful in terms of speed and optimization. It received much renewed interest after a revamp (or release, I'm not certain) of the Rails web development framework, which is regarded as top class, providing a better experience in those areas than PHP, Flask, Django, and others.

 

Node.js - if you want a very modern, straight for the internet, web development framework. It is based on Javascript, the language that is used to make functional front-end, browser driven applications; JS is the standard for doing such things on every widely used web browser today (animations, input/output control, etc). Node.js is essentially an extension of the Javascript empire to the backend, where you could do all of the server-side things the other frameworks can do too.

 

All of these languages have libraries you can install to communicate with SQL servers, and they generally try to make it easy. At the point where you're familiar with HTML, CSS, SQL, and one of the above languages/frameworks, you could start pumping out web applications of most any kind. Alternatively, you could pick from the above and make a desktop application, rather than a web application, using Python or Rails; in that case you'd have to have each of your users download the program onto their computers.

Posted

There is also

 

Java/Android - Used on a lot of mobile phones lately

C - Server

Coldfusion - Server developed by adobe written in c++

Asp - Windows Server native language

Command line servers - Pre html servers

Posted (edited)

I'm new to computer programming but I thought I'd have a summer project now exams are finished. Which language is the best to develop a data input program for work. Which language would be the best to have a tick box for people people to click and submit once they've made an equipment check. The time gets logged on a database with time and date and there is an interface so other people at work can look and see what equipment has to be checked for that day. There is a computer system with multiple computers on the same account so it will have to support multiple users. I guess there should be a refresh button everytime someone wants to check. It also needs to have an input and delete function so users can delete and add checks that need to be checked. How hard is this? What programming language is the best?

 

For type of program that you described, I would use .NET Framework,

It's programmed by Visual Studio/Visual Studio Express.

Whether you will use C++ Managed (like I do), or C# is up to you.

 

I guess there should be a refresh button everytime someone wants to check.

 

I would do it without having to press Refresh button. It's obsolete way of programming.

There is needed to create BackgroundWorker, which has waiting loop and when there is arriving signal, update GUI in ProgressChanged.

https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.progresschanged%28v=vs.100%29.aspx

It's up to you how transmission of data between clients will be implemented.

But if they're in the same LAN, simply open some TCP/IP port, on each IP when app is started.

They will find others by scanning LAN IP range f.e. 192.168.0.2...192.168.0.254

You can start with system by modifying regs. Nearly all my .NET apps have option to start with system minimized and in right-bottom tray icon for quick opening window.

 

It could be even made without one central server (without having to have constantly turned on machine). And each client will be peer in network.

Web browser based implementation mentioned above, require having one central machine to which all clients are connecting.

If server is down, whole app is useless, and nobody can do anything, until it's fixed.

But if there is no central server, it's not an issue anymore.

Edited by Sensei
  • 4 weeks later...
Posted

I would make sure you don't have a server administrator that would be royally pissed if you installed a bunch of stuff on his server lol. After that check to see what's already installed and being used so you don't complicate your server environment with a bunch of different servers. What operating system is it? Are you using Active Directory and Windows Server? If so you already have a webserver called IIS and ASP is already installed. Is it Linux?

 

More information would be helpful, I can give you the commands to run to check to see if anything is already installed.

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.