Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web based applet -programming n00b

Options
  • 12-05-2009 10:41am
    #1
    Registered Users Posts: 6,924 ✭✭✭


    Hwy guys just looking for a bit of help and advice.
    I'm looking to make, or for someone to make for me ,a very simple web based applet.
    The premise is very simple, I just want an applet that randomly picks out a name for me. For example It allows you to select how many names you want to put in, then you put in the names then you press a button and it chooses a name for you, basically just a randomator.

    Am I right in thinking that this is programming?

    Would it be hard for someone with zero programming experiance to put something like this together or should I get someone to do it for me? How much do you think a freelancer would charge for something like this?

    Thanks for any help


Comments

  • Registered Users Posts: 8,070 ✭✭✭Placebo


    depends on the algorithm you want to follow.

    A- APPLE
    B - DOG


    DOGAPPLE
    or DOGPPLE

    something like that would be very easy to do

    or if youre looking for a sophisticated generator that generates words by looking at nouns etc or provides synonyms then more work = more $$$

    A - HAPPY PUPPY

    laughing dog


  • Registered Users Posts: 6,924 ✭✭✭shoutman


    Ok you have confused me :)

    Maybe I didn;t make myself clear.

    Say for example I wanted to create a baby name generator.
    I want to be able to input a number of names, eg: John, Joe, Frank, Barry etc.

    Then I want it to randomly select one for me.

    Pretty much just like an internet applet of putting names in a hat and picking one out.


  • Registered Users Posts: 2,164 ✭✭✭hobochris


    if its an applet your looking for then start learning java.

    from the sounds of things you'll need some sort of persistence which could be tricky because applets run in the sandbox.

    It will be a big learning curve.. It may be easier for you to use flash, doesn't require half as much programing knowledge, then you'll have an embed flash app in your page(like an applet).


  • Registered Users Posts: 6,924 ✭✭✭shoutman


    hobochris wrote: »
    if its an applet your looking for then start learning java.

    from the sounds of things you'll need some sort of persistence which could be tricky because applets run in the sandbox.

    Thanks for the info, could you explain what you mean by applets run in the sandbox? I'll do a search for where to start on Jave, but any links on here would be much appreciated too.


  • Registered Users Posts: 2,164 ✭✭✭hobochris


    shoutman wrote: »
    Thanks for the info, could you explain what you mean by applets run in the sandbox? I'll do a search for where to start on Jave, but any links on here would be much appreciated too.

    you'll find all you need here: http://java.sun.com

    The sandbox is a term used to describe the condition in which web apps are allowed run in, their access to the end users computer is restricted for security reasons. They cannot read from or write to the hard drive or execute any other process(with the exception of those developed as activex tools, but even that's tricky & only works really in i.e).

    if your going the java route you need to learn the applet lifecycle aswell
    (init, start,stop, destroy) you wont understand this until you learn the basics of java.

    here is a link anyway:

    http://java.sun.com/docs/books/tutorial/deployment/applet/lifeCycle.html


  • Advertisement
  • Registered Users Posts: 8,070 ✭✭✭Placebo


    i could make one for you,
    could easily use php


  • Registered Users Posts: 6,924 ✭✭✭shoutman


    Thanks for the offer placebo, but being a student with no summer job I think learning (or at least attempting to learn) java could be beneficial.


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    here you go

    http://www.w3schools.com/js/default.asp

    look at variables
    then function for random numbers


  • Closed Accounts Posts: 448 ✭✭ve


    A someone else mentioned this could be done in PHP, and called using Ajax from the browser. It would be much easier to customise the front end also (the way it looks). Also the end user wouldn't need to have Java installed. Not common I know, but still I think Java Applets are overkill on resources and complexity for what's required.

    I think with the applet sandbox you can still create connections back to the originating IP. Anyway an applet is not the best candidate technology for this application IMHO.

    Find out the capabilities of your host? (E.g is it a LAMP server)

    Then post back here and people will be able to better advise you on how to proceed. What you are trying to do is a programming problem (not much of one, it must be said), but the real issue is figuring out what would be the best technology for you to use.


  • Registered Users Posts: 6,924 ✭✭✭shoutman


    Jaysus I really didn't think it would be a problem at all!
    As it stands I do not have a host as this is going totally from scratch so I have no domain, no host, nothing. It's still just an idea.


  • Advertisement
  • Closed Accounts Posts: 448 ✭✭ve


    shoutman wrote: »
    Jaysus I really didn't think it would be a problem at all!
    As it stands I do not have a host as this is going totally from scratch so I have no domain, no host, nothing. It's still just an idea.
    To be honest when it comes to the web there are a lot of people out there that automatically believe that web based systems are much easier to throw together than their desktop counterparts. This is completely untrue. I am a qualified and experienced software engneer and to be honest some of the most complex software I have ever developed or was involved in was web based, and that's after spending time doing embedded systems, multiplatform desktop applications (vm based and platform specific).

    As I said before what you are trying to accomplish is not difficult, but to someone with absolutely no experience, it's not easy.


  • Registered Users Posts: 110 ✭✭mrbike


    Listen, you guys are really going off on a tangent here. You don't need a Java applet (Overkill). You definitely don't need a web application server (PHP), and who recommended flash?

    I find it hard to believe you guys are software engineers.

    Just keep it simple and use Javascript. This runs locally in the browser. It's still programming, but Javascript was designed for this kind of stuff.

    You will -

    1. Need to create a HTML form to gather the list of names (called strings in programming)
    2. Use Javascript to process and pick out a string at random.
    3. Print the name.

    Here's a quick link to get you started:
    http://home.cogeco.ca/~ve3ll/jstutor9.htm

    ////////


  • Closed Accounts Posts: 448 ✭✭ve


    Ok so they use a HTML form to get the names, which magically just remembers the names entered between user sessions some how and then uses javascript to randomly pick one out.

    Before you knock other peoples suggestions, think about what you are saying ;)


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    ve wrote: »
    Ok so they use a HTML form to get the names, which magically just remembers the names entered between user sessions some how and then uses javascript to randomly pick one out.

    Before you knock other peoples suggestions, think about what you are saying ;)

    In fairness, the OP never mentioned persistence as a requirement - I got the impression he wanted to type in a list of names, and have the app pick one of them for him at random. In which case, I'd tend to agree with mrbike's suggestion of a brief bit of Javascript.


  • Registered Users Posts: 110 ✭✭mrbike


    It's all about the requirements ;)


  • Closed Accounts Posts: 448 ✭✭ve


    I thought about the OP's original post and the lack of mentioning peristence, but when you consider the application...

    How often would someone visit a website, enter in a load of data via forms all during a single session and then click on a button to have some action performed that could have easily been done by the user themselves in the first place. I mean if I had say a list of 100 names on a sheet of paper, and manually enterered them in, just to click a button and have the system pick out random strings then surely I would be much better off just randomly picking one off the sheet of paper myself as opposed to conducting a potentially lengthy data entry task.

    This is my thinking and if it's not what the OP wanted, then yes by all means use javascript to manage data made available during a single session. It would be a much easier approach.


  • Registered Users Posts: 2,164 ✭✭✭hobochris


    ve wrote: »
    I thought about the OP's original post and the lack of mentioning peristence, but when you consider the application...

    How often would someone visit a website, enter in a load of data via forms all during a single session and then click on a button to have some action performed that could have easily been done by the user themselves in the first place. I mean if I had say a list of 100 names on a sheet of paper, and manually enterered them in, just to click a button and have the system pick out random strings then surely I would be much better off just randomly picking one off the sheet of paper myself as opposed to conducting a potentially lengthy data entry task.

    This is my thinking and if it's not what the OP wanted, then yes by all means use javascript to manage data made available during a single session. It would be a much easier approach.

    +1

    Exactly what i was thinking..

    @mrbike: you're right, the op doesn't need an applet, but his original post suggested he/she wanted to use one, that's why java was mentioned. As for flash, It my not be the best technology ever, but if you know **** all about programming its easy to pick up.

    You seem very quick to jump down peoples throats on such issues as persistence, as Ve pointed out and any software developer can see, from the Op's description of the functionality, its clearly needed.


  • Registered Users Posts: 110 ✭✭mrbike


    hobochris wrote: »
    +1

    Exactly what i was thinking..

    @mrbike: you're right, the op doesn't need an applet, but his original post suggested he/she wanted to use one, that's why java was mentioned. As for flash, It my not be the best technology ever, but if you know **** all about programming its easy to pick up.

    You seem very quick to jump down peoples throats on such issues as persistence, as Ve pointed out and any software developer can see, from the Op's description of the functionality, its clearly needed.

    Sorry, didn't mean to come across as jumping down peoples throats. What's happened here is a classic case of jumping straight into the implementation without gathering the requirments first.

    Step one is to find out what the user really wants. As the OP is not a programmer, it's vital to find out what they really want to do before jumping in with the solution.

    You are assuming the OP requires persistance as the application would not be useful otherwise. What if the OP just want's to write an app that is the equivalent of picking names out of hat? It it an app just for fun? Who knows...

    Sorry to drag on, but I've seen to many good devs fall into this trap.


  • Registered Users Posts: 6,924 ✭✭✭shoutman


    Thanks everyone for all the advice so far.

    Obviously I haven't been crystal clear with what I want to do.

    So here goes.

    I want to make a web based program/website where by there is a list of different football leagues in the world. When you click on the league you want you then can press a button and it will randomly bring up one team. Basically this is just for a bit of fun so that people can randomly choose a football team to support in a given league.

    I would also like it to have the capability of the user being able to put in a list of teams and then press a button and the program randomly picks a team from the list.

    So basically, there would be a database of leagues/teams and also somewhere that the user can input new teams.

    I hope that makes sense.

    Thanks.

    Edit: Currently I know zero about programming but I do have three months free to at least begin to learn it. So doing it the simplest way possible isn't really my goal, it's more doing it so it looks and operates as well as it can.


  • Closed Accounts Posts: 448 ✭✭ve


    @shoutman, I'm sure you're probably thinking we're all being very pedantic about this, but unfortunately the need to weed out ambigiuity is extremely common in this sort of thing and people that dont' do this sort of thing tend not to realise that it is not always easy to give a description without letting some form of ambiguity creep in. That is all, take no offence. I remember in school (many moons ago) a science teacher asking my class to give him precise step-by-step instructions on how to put on a jumper. It was a casual conversation one day about automation, programming and robotics, but you would be amased at how long it took people to come up with a adequate set of instructions in English, nevermind implemented through code.

    I think this application will require some server side processing to manage the database (E.g. PHP) and you could use (but not absolutely required) Ajax calls from Javascript on the client side to retrieve randomly selected data and present it. This way you and your users would not have to suffer repeated page reloads when you just need to retrieve and present the random string.

    The cheapest way to do this would be to get yourself a shared host either Linux (use PHP/MySQL) or Windows (use ASP/MSSQL), although I would personally go the Linux road.

    Cheers for further clarifying your requirements for all of us ;)


  • Advertisement
  • Registered Users Posts: 6,924 ✭✭✭shoutman


    No offence taken at all, i'm the one asking for advice!

    That said I still wouldn't have a clue where to start after your post. Could you recommend any books or tutorials that will give me a grounding in what I need to be doing for this project?


  • Closed Accounts Posts: 448 ✭✭ve


    shoutman wrote: »
    That said I still wouldn't have a clue where to start after your post. Could you recommend any books or tutorials that will give me a grounding in what I need to be doing for this project?

    Not problem at all. Based on my own suggested approach...

    I recommend you learn how to create web pages / interfaces in a standards compliant manner. By standards compliant I simply mean that the code that you write adheres to standards outlined by the W3C. This is easier than it sounds. A code validator for (X)HTML exists here... http://validator.w3.org/. Don't use WYSIWYG tools when starting out, stick to using text editors. Notepad++ is a free text editor which has syntax highlighting. There are countless other options but that's a handy one that just springs to mind. When it comes to writing such code http://www.w3schools.com/ is an excellent place to start. My advise is just learn how to create standards compliant documents that use CSS to style them. This may take a while to get your head around, and avoid using HTML tables to layout pages, use CSS.

    Then look at using Javascript to handle events within the web interface itself. Can I suggest you get a basic handle on Javascript itself and then look at using JQuery (a Javascript framework, that will make your life a lot easier) so you can avoid producing browser specific code in an unobstrusive manner.

    Once you have your web pages in place, then look at E.g. PHP. You will need a server such as Apache / Zeus / etc that will have PHP enabled to run your code on. At this point you can get setup with a hosting account yourself or install the environment on your local PC yourself. Either way you need a place to run your PHP code you write. PHP code runs and typically produces HTML output, where as plain HTML documents are opened and rendered as is (ie. you can test them with just a browser and nothing else).

    When looking at PHP, also look at database design and SQL, because your PHP code reading and writing info to a database (suggest MySQL).

    When it comes to web design / development please please please pay attention to web standards and good interface design practices. This is an area that is often overlooked and undervalued. When you are producing web sites / interfaces it is good to remember that good code design is just as important to how the end result looks to a user. I could develop for you right now 2 website that are visually and functionally identical, but where one is based on very bad code and the other adheres to all respective web standards. This is something that has become extremely important to people who work with web technologies and there has been an ongoing war over the years regarding standards compliance between the standards authority (W3C) with browser vendors (IE, Firefox, etc) and with code developers (you, me, mick, bob...). So if you're starting out with this stuff, you might as well do it right and not take short cuts (..."Ah sure I know the code is crap, but it works and looks like I want it to look!"...), which is exactly how people end up developing very bad habbits.

    Best of luck. If I can be of any more help just ask ;)


  • Registered Users Posts: 1,045 ✭✭✭Bluefrog


    I don't think phrases like 'I find it hard to believe you guys are software engineers.' are helpful on a discussion board that is here to help people.

    Programming is often team based and just as important as it is to have an ability to logically step through a scenario, it is just as important that you are able to communicate with others in a respectful way and given that usually you will be building something on behalf of someone who is not a programmer, an ability to tease out the idea with the client so you understand the problem domain completely is essential.


  • Registered Users Posts: 7,156 ✭✭✭witnessmenow


    shoutman wrote: »
    No offence taken at all, i'm the one asking for advice!

    That said I still wouldn't have a clue where to start after your post. Could you recommend any books or tutorials that will give me a grounding in what I need to be doing for this project?

    If you have no programming experience it mightn't be any harm to starting with offline stuff.

    Download Eclipse and install it and java


    For this program you basically want to array of strings and a random number generator

    A string is a data type that holds characters

    An array is operates like this:

    Array "team":
    [0] = Liverpool
    [1] = Man Utd
    [2] = Arsenal


    When you print team[0] it will print Liverpool

    So what you want to do is generate a random number between 0 and the number of teams in the league - 1 (0 is an address in a array)

    then print team[random]

    Hopefully this helps and doesn't confuse you (I also hope i didn't make a fool of myself!)

    I've never done any web applets myself, but would be interested in learning. I'll gladly try throw something together next week if you'd like to get in touch to iron out some details? I wouldnt be charging or anything (but remember, you get what you pay for! :pac:)


  • Closed Accounts Posts: 995 ✭✭✭Ass


    "Download java and program your applet in that" is the only sentence you need in this thread. It's not some kind of a critical system you're programming here so you can ignore pretty much anything anyone else has said in this thread about complexity or program design.

    There's a lot of posts with a lot of words itt when only one is needed.... "Java".


    Or else if you want the names to be saved to the page make a simple HTML page with a php script and a database at the back end. There are lots of tutorials for this on the web.


Advertisement