Discussion
So, I have a cunning plan. There's a wicked Project Management application called Taskjuggler. It's really good, but difficult to use.
You have to write a text file of the correct syntax, whilst adhering to some basic rules about certain properties of a task or resource precluding others. I've used it, and got some really good results, but I've spent more time learning how to use it than I've saved on the projects I've managed with it.
I have an idea to write a web-based front-end for it. The text-based nature of it makes me think this would be possible. Some form of pointy-clicky interface that wrote the syntactically correct text for you, whilst performing some form of checks to make sure you adhered to the basic rules, would seem useful.
Pass this to a database on the webserver, cobble it together into a project definition, and run the Taskjuggler algorithm on it to get the pretty HTML output published to a password protected website.
But the thing is, I know nothing about web applications. Or much about software in general. But I'm an engineer, and nothing's that hard for an engineer is it? More importantly, I'm keen to learn. But I don't know what to learn.
So how should I go about it? PHP? Ruby? (on rails?)? Python? Other?
In short, I want to be able to go to a website, click some s
t, assemble a text file based on those clicks, and execute a shell script on that text file.
Databases may or may not be involved in storing the text.
Thoughts?
You have to write a text file of the correct syntax, whilst adhering to some basic rules about certain properties of a task or resource precluding others. I've used it, and got some really good results, but I've spent more time learning how to use it than I've saved on the projects I've managed with it.
I have an idea to write a web-based front-end for it. The text-based nature of it makes me think this would be possible. Some form of pointy-clicky interface that wrote the syntactically correct text for you, whilst performing some form of checks to make sure you adhered to the basic rules, would seem useful.
Pass this to a database on the webserver, cobble it together into a project definition, and run the Taskjuggler algorithm on it to get the pretty HTML output published to a password protected website.
But the thing is, I know nothing about web applications. Or much about software in general. But I'm an engineer, and nothing's that hard for an engineer is it? More importantly, I'm keen to learn. But I don't know what to learn.
So how should I go about it? PHP? Ruby? (on rails?)? Python? Other?
In short, I want to be able to go to a website, click some s
t, assemble a text file based on those clicks, and execute a shell script on that text file.Databases may or may not be involved in storing the text.
Thoughts?
tegwin said:
If its a web app you want...
then write it in PHP.... You will need ome SQL/Mysql to connect to your database... I dont know anything about task juggler... but IMHO php would be my approach... Theres plenty of snippets of code on the web which is useful to do the basic stuff..
OK. One vote for PHP. Is Ruby not good for interactive webpages n stuff? Anyone have any experience?then write it in PHP.... You will need ome SQL/Mysql to connect to your database... I dont know anything about task juggler... but IMHO php would be my approach... Theres plenty of snippets of code on the web which is useful to do the basic stuff..
OK before I get too far into PHP, can someone tell me if the following would be possible.
A webpage with a form containing three input boxes.
The first is a start date of a project.
The second is the end date of a project.
The third is the duration of the project.
Obviously, to fully define the timeline of the project you only need any two of these.
something like:
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
A webpage with a form containing three input boxes.
The first is a start date of a project.
The second is the end date of a project.
The third is the duration of the project.
Obviously, to fully define the timeline of the project you only need any two of these.
- A start date of today, and a duration of a week means the project has to finish next Monday.
- A start date of today and a finish date of next Monday would mean the project has a duration of 1 week.
- and so on.
something like:
if length(box one contents) > 0 && length(box two contents) > 0
then
box three is disabled
endif
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
You could do that with PHP if you used a technology called AJAX. This would do take the inputs, do some processing in the background, and then refresh the part of the page containing the third input box.
However...
An easier way would be with javascript.
Give each input box a unique ID, e.g.
<input type="text" id="starttime" ...
You would need a javascript function that calculated Duration = End Time - Start Time, Start Time = End Time - Duration, or End Time = Start Time + Duration.
You could then set an onChange event on all three of your input boxes that would call the function when a user types a value into the box.
The function should be clever enough to know if it has two of the three it needs, and therefore to populate and disable the third input box.
However...
An easier way would be with javascript.
Give each input box a unique ID, e.g.
<input type="text" id="starttime" ...
You would need a javascript function that calculated Duration = End Time - Start Time, Start Time = End Time - Duration, or End Time = Start Time + Duration.
You could then set an onChange event on all three of your input boxes that would call the function when a user types a value into the box.
The function should be clever enough to know if it has two of the three it needs, and therefore to populate and disable the third input box.
...if you wanted to get snazzy, make the start time and end time input fields into a calendar using jQuery:
http://jqueryui.com/demos/datepicker/
http://jqueryui.com/demos/datepicker/
OK, so it's all possible. This is good. I'll stick with the beginners' PHP tutorial this afternoon. There's a long way to go.
The start time/end time/duration rule is an example I made up off the top of my head, but it's typical of the sort of rule that makes Taskjuggler throw a build error.
Now all I have to do is find out a way of getting all of these rules out of Taskjuggler so I can either recreate them in PHP, or somehow automagically just access them from my frontend.
:daunted:
Thanks for your help so far.
The start time/end time/duration rule is an example I made up off the top of my head, but it's typical of the sort of rule that makes Taskjuggler throw a build error.
Now all I have to do is find out a way of getting all of these rules out of Taskjuggler so I can either recreate them in PHP, or somehow automagically just access them from my frontend.
:daunted:
Thanks for your help so far.
If you do want to automagically access content from some form of text file (not sure how the system you are using works) look into regular expressions (aka regex). Its very powerful and allows you to grab specific words and parts of word patterns that may occur. i.e. grab all the properties from a properties file or something.
Shay HTFC said:
If you do want to automagically access content from some form of text file (not sure how the system you are using works) look into regular expressions (aka regex). Its very powerful and allows you to grab specific words and parts of word patterns that may occur. i.e. grab all the properties from a properties file or something.
Neither am I. 
If it's using comma delimited files (sounds likely) then PH has a neat function called fgetcsv() - http://php.net/manual/en/function.fgetcsv.php
It'll import and parse a CSV to an array for you very easily.
It'll import and parse a CSV to an array for you very easily.
bitwrx said:
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
You're into client side scripting to do that, which is the spawn of the devil and a blight on the face of the world wide web.You might guess that I'm not a fan of javascript

onomatopoeia said:
bitwrx said:
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
You're into client side scripting to do that, which is the spawn of the devil and a blight on the face of the world wide web.You might guess that I'm not a fan of javascript

evenflow said:
onomatopoeia said:
bitwrx said:
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
You're into client side scripting to do that, which is the spawn of the devil and a blight on the face of the world wide web.You might guess that I'm not a fan of javascript

Also better for Accessibility and SEO purposes.
AlunR said:
evenflow said:
onomatopoeia said:
bitwrx said:
So can PHP create dynamic pages that change as a result of user input without having to send another request back to the server?
You're into client side scripting to do that, which is the spawn of the devil and a blight on the face of the world wide web.You might guess that I'm not a fan of javascript

Also better for Accessibility and SEO purposes.
Not worried about SEO. Hadn't considered accessibility - it's only a self-education project anyway.
And what's meant by 'degrades gracefully'?
bitwrx said:
So if I turn out to be a javascript non-fan, how else would something like this be done. Or how do I design a workaround?
You could do the logic and processing element "server side" with PHP, but if you want to start disabling form fields in the browser then you will need to use some client side javascript. If it is a personal project then don't worry about it, as long as you yourself don't have javascript switched off in your browser!bitwrx said:
And what's meant by 'degrades gracefully'?
It means to design something that will work for the end user independently of whatever technology they have enabled or not in their browser.For example, you may design the front-end to fill in a form field with client-side javascript. What if the user has javascript disabled in their browser? Then your software needs to take this into account and still work for them - just without this particular bell/whistle IYSWIM.
http://en.wikipedia.org/wiki/Unobtrusive_JavaScrip...
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


