Teaching Java, teaching what?

Discussion in 'Java' started by Stefan Ram, Dec 8, 2013.

  1. Stefan Ram

    Stefan Ram Guest

    Many Java classes and Java books teach Java foundations and
    then Java OOP to finally be able to show how Swing can be
    used to create programs that look like beginners expect
    programs to look like, i.e., they do not write some text to
    an old-fashioned text console, but run as a GUI windows.

    But then, I hear everywhere: »Java on the Desktop is dead.«.
    Now I asked myself: Is it wrong to teach how to write Java
    desktop applications in a class (using Swing)? After all,
    you do not want to waste the time of the students by
    teaching them something that is »dead«?
     
    Stefan Ram, Dec 8, 2013
    #1
    1. Advertising

  2. Stefan Ram

    Eric Sosman Guest

    On 12/8/2013 11:00 AM, Stefan Ram wrote:
    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.
    >
    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?


    "Believe ninety percent of what you see, fifty percent of
    what you read, and ten percent of what you hear."

    That was my father's dictum when I was quite young, long
    before the Internet came along (had the Internet been around,
    he would surely have moved "fifty percent" to a lower figure).
    Anyhow, he'd have said that what you "hear everywhere" is only
    ten percent reliable, so although you should pay it some heed
    you shouldn't let it influence you too strongly.

    My own take (uninformed; peg this somewhere between the
    ten- and fifty-percent level) is that Java applets have shown
    themselves to be too dangerous for the lawless Net. This does
    not, however, equate to "Java on the desktop is dead." Both
    applets and Java Web Start *in a controlled environment* can
    be safe and useful. Use them on the inTRAnet if you like, as
    a way to deploy in-house applications. Also, Swing can put a
    perfectly adequate (albeit not fancy) GUI on an application
    launched from the desktop rather than in a browser, should you
    wish to do so.

    Does this make a case for, or a case against, teaching Swing?
    Sorry; for that question I don't have even a ten-percent answer.

    --
    Eric Sosman
    d
     
    Eric Sosman, Dec 8, 2013
    #2
    1. Advertising

  3. Stefan Ram

    Jeff Higgins Guest

    On 12/08/2013 11:00 AM, Stefan Ram wrote:
    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.
    >
    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?
    >

    It would be wrong to accept a student whose educational objective
    misaligned with your syllabus. Are you seeking reassurance?
     
    Jeff Higgins, Dec 8, 2013
    #3
  4. Stefan Ram

    markspace Guest

    On 12/8/2013 8:49 AM, Eric Sosman wrote:

    > My own take (uninformed; peg this somewhere between the
    > ten- and fifty-percent level) is that Java applets have shown
    > themselves to be too dangerous for the lawless Net. This does


    Just to toss in my own two nickels, I don't believe that applets are
    inherently more dangerous than Adobe Flash or JavaScript. The major
    problems with applets lately was Oracle was slow to addressing security
    issues. That's really a problem for any internet connected computer or
    program. Heck Windows OS wasn't exactly known for its security on the
    'net a few years ago.
     
    markspace, Dec 8, 2013
    #4
  5. Stefan Ram

    Stefan Ram Guest

    Jeff Higgins <> writes:
    >It would be wrong to accept a student whose educational objective
    >misaligned with your syllabus.


    There is no fixed syllabus. The school for adult students
    just asks me to give a »Java class«, the details of the
    syllabus are left to me. Every year I am trying anew to
    write a good syllabus for my Java class that should be
    aligned with as much student's educational objective's as
    possible and also reflect what I deem to be important to
    learn about Java. I am at liberty to include or exclude Swing.

    I do not choose students, instead it's the other way round:
    If my syllabus and the student's educational objectives are
    misaligned too much, the student will not visit my class.
     
    Stefan Ram, Dec 8, 2013
    #5
  6. Stefan Ram

    markspace Guest

    On 12/8/2013 11:12 AM, Stefan Ram wrote:
    > Jeff Higgins <> writes:
    >> It would be wrong to accept a student whose educational objective
    >> misaligned with your syllabus.

    >
    > There is no fixed syllabus. The school for adult students
    >
    > I do not choose students, instead it's the other way round:


    Do students ever return and tell you what they thought of their class?
    What was their feedback? Do you consult with the employers of those
    students to find what they want?

    Both of these strike me as better ideas than asking us. Personally,
    it's been so long since I learned both Java and especially my first
    programming language, I wouldn't trust myself to give advice to anyone
    starting out today without knowing some context.
     
    markspace, Dec 9, 2013
    #6
  7. Stefan Ram

    Joerg Meier Guest

    On 8 Dec 2013 16:00:00 GMT, Stefan Ram wrote:

    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.


    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?


    Ok, Java on the desktop certainly isn't dead, heck, even gaming in Java has
    just recently excited millions and millions of people with stuff like
    Minecraft.

    But that being said, Swing/GUI is a comparatively 'hard' task, spanning a
    huge VOLUME of information. By that I mean that unlike, say, Reflection, or
    big O notation, Swing isn't just something you have to 'understand', but
    also something that even while teaching the brightest students will take a
    long time due to how many pieces there are that people will need to
    understand to do the bare minimum.

    If you can keep your students interested without touching Swing, I'd say
    stay away from it, or maybe provide links to tutorials for the interested
    students. If your students are not excited by console apps, you might want
    to consider other things to teach that interest them.

    For example, it is relatively trivial to produce a basic framework allowing
    people to move things on the screen in a framework like libGDX (like, as a
    game). It might not exactly be a job skill, but then neither will one
    course of Swing intro be.

    Liebe Gruesse,
    Joerg

    --
    Ich lese meine Emails nicht, replies to Email bleiben also leider
    ungelesen.
     
    Joerg Meier, Dec 9, 2013
    #7
  8. Stefan Ram

    Jeff Higgins Guest

    On 12/08/2013 02:12 PM, Stefan Ram wrote:
    > Jeff Higgins <> writes:
    >> It would be wrong to accept a student whose educational objective
    >> misaligned with your syllabus.

    >
    > There is no fixed syllabus. The school for adult students
    > just asks me to give a »Java class«, the details of the
    > syllabus are left to me. Every year I am trying anew to
    > write a good syllabus for my Java class that should be
    > aligned with as much student's educational objective's as
    > possible and also reflect what I deem to be important to
    > learn about Java. I am at liberty to include or exclude Swing.
    >
    > I do not choose students, instead it's the other way round:


    > If my syllabus and the student's educational objectives are
    > misaligned too much, the student will not visit my class.
    >

    The student visited my class.

    Therefore my syllabus and the student's
    educational objectives are not misaligned too much.

    Good job!

    My bet is that Swing will be a part of the JDK and JRE
    for a long time. Yes, beginners expect to see windows.
    With a current JDK what are the GUI alternatives?
    Are you comfortable with teaching all of the alternatives?
    So far it seems harder to pop up a dialog in JavaFX than Swing.
    But then I don't yet have much experience with JavaFX.
    If the adult students are learning to program for their
    own enjoyment, then teach what you are most comfortable with.
    They will explore the alternatives on their own once they
    get over the hump. If it is vocational training then teach
    what they are required to know.
     
    Jeff Higgins, Dec 9, 2013
    #8
  9. Stefan Ram

    Arne Vajhøj Guest

    On 12/8/2013 11:00 AM, Stefan Ram wrote:
    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.
    >
    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?


    Java on the desktop has not died - it never lived.

    :)

    But I don't think it matters.

    You students need to learn OOP and Java programming.

    Creating desktop Java applications is fine for that.

    JSF web apps, JAX-RS web services with non-Java frontend,
    Spring MVC web apps, GWT etc. may be more common than
    Java desktop apps, but I think they are less suited to learn
    OOP and Java.

    And Java desktop skills are not wasted:
    * such apps do get written - maybe not as state of the art
    commercial applications but still a lot of utility apps - and
    even though maybe 90% of Java developers work in the Java EE
    world, then my guess is that 95% of Java developers know how to
    write a Java desktop app
    * it is easier to learn writing desktop application sin another
    language after having learned about it in Java - all the stuff
    about event thread etc. also exist in other technologies

    Arne
     
    Arne Vajhøj, Dec 9, 2013
    #9
  10. Stefan Ram

    Arne Vajhøj Guest

    On 12/8/2013 2:03 PM, markspace wrote:
    > On 12/8/2013 8:49 AM, Eric Sosman wrote:
    >
    >> My own take (uninformed; peg this somewhere between the
    >> ten- and fifty-percent level) is that Java applets have shown
    >> themselves to be too dangerous for the lawless Net. This does

    >
    > Just to toss in my own two nickels, I don't believe that applets are
    > inherently more dangerous than Adobe Flash or JavaScript. The major
    > problems with applets lately was Oracle was slow to addressing security
    > issues. That's really a problem for any internet connected computer or
    > program. Heck Windows OS wasn't exactly known for its security on the
    > 'net a few years ago.


    I mostly agree.

    Executing code downloaded from the internet is very tricky
    security wise.

    And alternatives like Flash, SilverLigth and JavaScript has
    certainly had their security vulnerabilities as well.

    I do think Java applets has a few extra features that
    may have contributed to the problems:
    * the ability to be allowed privs by user
    * full API

    Arne
     
    Arne Vajhøj, Dec 9, 2013
    #10
  11. Stefan Ram

    Arne Vajhøj Guest

    On 12/8/2013 11:00 AM, Stefan Ram wrote:
    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.
    >
    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?


    But please consider switching from Swing to JavaFX!

    Because:
    * it is the future
    * it is a more modern way of doing GUI development
    * you can do some nifty things with embedded browser, embedded
    multi media etc. that may impress your students

    Arne
     
    Arne Vajhøj, Dec 9, 2013
    #11
  12. Stefan Ram

    Roedy Green Guest

    On 8 Dec 2013 16:00:00 GMT, -berlin.de (Stefan Ram) wrote,
    quoted or indirectly quoted someone who said :

    > But then, I hear everywhere: »Java on the Desktop is dead.«.


    What has replaced it?

    All the excitement right now is apps for cellphones. Sales of desktop
    computers is dropping and of portables is rising.


    --
    Roedy Green Canadian Mind Products http://mindprod.com
    Unlike many machines, computers require no water once they are
    manufactured.
     
    Roedy Green, Dec 9, 2013
    #12
  13. Stefan Ram

    Silvio Guest

    On 12/08/2013 05:00 PM, Stefan Ram wrote:
    > Many Java classes and Java books teach Java foundations and
    > then Java OOP to finally be able to show how Swing can be
    > used to create programs that look like beginners expect
    > programs to look like, i.e., they do not write some text to
    > an old-fashioned text console, but run as a GUI windows.
    >
    > But then, I hear everywhere: »Java on the Desktop is dead.«.
    > Now I asked myself: Is it wrong to teach how to write Java
    > desktop applications in a class (using Swing)? After all,
    > you do not want to waste the time of the students by
    > teaching them something that is »dead«?
    >


    Why not have them write a simple Servlet or two? Teach them some very
    basic HTML/CSS tricks for their second or third Servlet (as opposed to
    plain text) and I am sure you get people interested.
    If you embed a Servlet container (Jetty comes to mind) they can all run
    their own application locally and test it from their browser.

    IMHO you should either go mobile or HTML(5). I know there are crowds
    clinging to Applet/Desktop/Swing/JavaFX etc. but it does not sound as a
    logical choice for an introductory course.

    Silvio
     
    Silvio, Dec 9, 2013
    #13
  14. Stefan Ram

    Stefan Ram Guest

    Silvio <> writes:
    >Why not have them write a simple Servlet or two?


    The time for teaching is very limited: I now often have only
    30 hours to take students from »no programming experience
    whatsoever« to »first steps with Swing« including exercises
    done in the classroom. When teaching Java with Swing, I need
    the JDK as the one single dependency: javac Main.java, java
    Main, and that's it.

    I have the impression that teaching servlets is more
    time-consuming, because the toolchain is longer and the
    configuration and application of more tools needs to be done
    and explained.
     
    Stefan Ram, Dec 9, 2013
    #14
  15. Stefan Ram

    Stefan Ram Guest

    "Chris Uppal" <-THIS.org> writes:
    >Have you considered teaching Android programming (in Java) instead of "desktop"
    >programming ?


    I am offering Android programming as a separate class for
    students with knowledge of the fundamentals of OO
    programming in Java. But for a general Java class this might
    be too special. The classroom has desktop PCs installed, so
    Swing might appear more natural in this environment.

    My Android course is based on Android Studio and Gradle, so
    I start with an explanation of Android Studio and Gradle.
    But this might not be interesting for everyone in a general
    Java class. Also some knowledge of XML is needed sometimes,
    so Android programming might have more prerequistes than
    Swing programming.

    A funny observation I made is that to take full advantage of
    Gradle, it helps to learn Groovy. So when Google will keep
    supporting Gradle, this also might make Groovy more popular.
     
    Stefan Ram, Dec 9, 2013
    #15
  16. On 12/08/2013 01:30 PM, Leif Roar Moldskred wrote:
    > Stefan Ram <-berlin.de> wrote:
    >>
    >> But then, I hear everywhere: »Java on the Desktop is dead.«.
    >> Now I asked myself: Is it wrong to teach how to write Java
    >> desktop applications in a class (using Swing)? After all,
    >> you do not want to waste the time of the students by
    >> teaching them something that is »dead«?
    >>

    >
    > Depends on what the class is meant to teach. If the point is
    > to teach GUI or event-driven programming and the students
    > already have experience with Java from earlier courses, fair
    > enough. If the point is to teach general programming or the
    > Java programming language, I think time and effort could
    > be invested a lot more wisely than teaching Swing.
    >

    I agree.

    I'll add this: we're talking about teaching _programmers_, not users of
    an application. Hence the comments about wanting to present a GUI rather
    than a text console are not really relevant. A working software
    developer is going to be looking at text console output and log files a
    lot, and maybe debugger displays...regardless of what the user interface
    is. So that's what you accustom your students to.

    And if I wanted to focus on a GUI, in order to (as Leif suggested)
    concentrate on event-driven programming, say, I'd pick a web app anyway.

    AHS

    --
    When a true genius appears, you can know him by this sign:
    that all the dunces are in a confederacy against him.
    -- Jonathan Swift
     
    Arved Sandstrom, Dec 9, 2013
    #16
  17. Stefan Ram

    Silvio Guest

    On 12/09/2013 02:34 PM, Stefan Ram wrote:
    > Silvio <> writes:
    >> Why not have them write a simple Servlet or two?

    >
    > The time for teaching is very limited: I now often have only
    > 30 hours to take students from »no programming experience
    > whatsoever« to »first steps with Swing« including exercises
    > done in the classroom. When teaching Java with Swing, I need
    > the JDK as the one single dependency: javac Main.java, java
    > Main, and that's it.
    >
    > I have the impression that teaching servlets is more
    > time-consuming, because the toolchain is longer and the
    > configuration and application of more tools needs to be done
    > and explained.
    >


    If you sufficiently wrap the embedded container inside a utility class
    the toolchain becomes quite short and all the students would do is
    define a Servlet class implementing a doGet method. They would need to
    know some basics about a HTTPServletResponse but I suspect getting
    started with even the most basic Swing stuff requires more knowledge
    upfront.

    On the other hand you would have to set up their environments with some
    additional JARs so that might be a problem, especially if they intend to
    take the fruits of their work home.
     
    Silvio, Dec 9, 2013
    #17
  18. On 12/09/2013 09:34 AM, Stefan Ram wrote:
    > Silvio <> writes:
    >> Why not have them write a simple Servlet or two?

    >
    > The time for teaching is very limited: I now often have only
    > 30 hours to take students from »no programming experience
    > whatsoever« to »first steps with Swing« including exercises
    > done in the classroom. When teaching Java with Swing, I need
    > the JDK as the one single dependency: javac Main.java, java
    > Main, and that's it.
    >
    > I have the impression that teaching servlets is more
    > time-consuming, because the toolchain is longer and the
    > configuration and application of more tools needs to be done
    > and explained.
    >

    I don't see it myself, that teaching servlets would be more
    time-consuming than teaching Swing (or JavaFX for that matter). In fact,
    I think that teaching servlets affords an excellent opportunity to
    introduce students to important real-world stuff:

    1) using libraries;

    2) the ubiquity and importance of app servers;

    3) HTTP request-response handling;

    4) how servlets underlie many Java frameworks, with a brief intro to how
    the frameworks build upon the servlet API.

    Can this be done in 30 hours, especially for programming neophytes?
    Maybe not. But I'm not convinced you can accomplish more by doing "first
    steps with Swing". The issue here may be that 30 hours isn't
    enough...but I myself have a gut feeling that you'd do better with a
    servlet approach.

    For a barebones first approach, I think we can over-emphasize the
    importance of GUIs (web or desktop) as being what beginners expect to
    see, or what they feel comfortable with. I'm probably dating myself
    here, but back in the '70's when I learned programming with FORTRAN 66
    and FORTRAN 77, I (and most of my peers) grokked program output to
    printer or tape, and program input from similar sources. It's also not
    difficult to relate a console input prompt to an HTML text input box -
    students understand that what matters is what you do with the input, not
    so much how you got it.

    Let me put something else out there. 30 hours is a short semester if we
    suppose three 1-hour classes per week. Is it even realistic to try and
    introduce any kind of GUI (Swing, JavaFX, servlets with simple HTML etc)
    in 30 hours? Perhaps console output is all you should shoot for.

    AHS
    --
    When a true genius appears, you can know him by this sign:
    that all the dunces are in a confederacy against him.
    -- Jonathan Swift
     
    Arved Sandstrom, Dec 9, 2013
    #18
  19. Stefan Ram

    Arne Vajhøj Guest

    On 12/9/2013 3:54 AM, Roedy Green wrote:
    > On 8 Dec 2013 16:00:00 GMT, -berlin.de (Stefan Ram) wrote,
    > quoted or indirectly quoted someone who said :
    >
    >> But then, I hear everywhere: »Java on the Desktop is dead.«.

    >
    > What has replaced it?


    Java was never a major player for desktop apps.

    Windows GUI apps are mostly old C++ MFC, old C# Win Forms,
    new C# WPF and a bit of the new WinRT stuff.

    *nix is still mostly C and C++ with various KDE and Gnome libs.

    > All the excitement right now is apps for cellphones. Sales of desktop
    > computers is dropping and of portables is rising.


    Sales of PC's has dropped some. But the PC is not headed for
    extinction.

    Arne
     
    Arne Vajhøj, Dec 10, 2013
    #19
  20. Stefan Ram

    Arne Vajhøj Guest

    On 12/9/2013 10:17 AM, Silvio wrote:
    > On 12/09/2013 02:34 PM, Stefan Ram wrote:
    >> Silvio <> writes:
    >>> Why not have them write a simple Servlet or two?

    >>
    >> The time for teaching is very limited: I now often have only
    >> 30 hours to take students from »no programming experience
    >> whatsoever« to »first steps with Swing« including exercises
    >> done in the classroom. When teaching Java with Swing, I need
    >> the JDK as the one single dependency: javac Main.java, java
    >> Main, and that's it.
    >>
    >> I have the impression that teaching servlets is more
    >> time-consuming, because the toolchain is longer and the
    >> configuration and application of more tools needs to be done
    >> and explained.
    >>

    >
    > If you sufficiently wrap the embedded container inside a utility class
    > the toolchain becomes quite short and all the students would do is
    > define a Servlet class implementing a doGet method. They would need to
    > know some basics about a HTTPServletResponse but I suspect getting
    > started with even the most basic Swing stuff requires more knowledge
    > upfront.


    A desktop app is very standalone.

    Web means:
    - two apps: browser and server
    - knowledge of at least HTML required (CSS and JS optional)
    - a little bit of knowledge about HTTP and the interaction

    And web is often less OO than desktop apps, which may move
    focus from the purpose of the course.

    Arne
     
    Arne Vajhøj, Dec 10, 2013
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Powell

    Self teaching, cannot lock database file

    Michael Powell, Mar 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,415
    Hans Kesting
    Mar 29, 2005
  2. VisionSet

    Teaching resources

    VisionSet, Oct 6, 2004, in forum: Java
    Replies:
    2
    Views:
    352
    Thomas Weidenfeller
    Oct 7, 2004
  3. Adrienne Boswell

    IE 5 as a teaching tool

    Adrienne Boswell, Mar 8, 2006, in forum: HTML
    Replies:
    1
    Views:
    407
    Neredbojias
    Mar 9, 2006
  4. Replies:
    24
    Views:
    741
    Arne Vajhøj
    Nov 6, 2011
  5. Mark
    Replies:
    43
    Views:
    2,012
    Martin Gregorie
    May 7, 2012
Loading...

Share This Page