Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By Tolls

Thread: hints about learning Hibernate

  1. #1
    marchello is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Question hints about learning Hibernate

    Hi all,
    I'm new to Java, finished (1) Java Syntax course, in process of learning (2) Java Core (50% done).
    Next steps should be: (3) Java Collections, (4) Java Multithreading, (5) Hibernate, (6) JSP & Services.

    My question is, is it realistic to start learning Hibernate before Collections and Multithreading?
    Is there anything important I should know? Any known obstacles to learn Hibernate without Collections and Multithreading?
    My strong side is that I worked with SQL many years already. Thus I'd like to start combining my skills as soon as possible.

    Thanks ahead for any hint.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,203
    Rep Power
    12

    Default Re: hints about learning Hibernate

    All I know about Hibernate is that it is a java based framework for working with databases. But Collections and multi-threading are what I would call key components/features of the Java language itself. Especially collections which are used in just about all aspects of Java programming. So I would learn those first. You should have a solid understanding of collections and have some working knowledge of concurrency. I'm fairly certain that any framework derived from Java will make use of the collections classes. Concurrency might rear its head when spawning off thousands of processes, each of which has to play nice with each other when accessing a DB or any other shared state between classes. Others on this forum familiar with Hibernate can offer more specific advice as it relates to that framework.

    Regards,
    Jim
    Last edited by jim829; 10-11-2017 at 03:55 AM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: hints about learning Hibernate

    As jim says, Collections and Threads are fairly fundamental to the two later parts.
    Collections won't take long, though I get the impression those sections are usually a cover for dealing with Generics.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: hints about learning Hibernate

    Actually, just a thought, but I don't see JDBC in there.
    I would have expected (personally) to see that as a precursor to Hibernate, unless it is part of the Hibernate section?
    kneitzel likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    marchello is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Default Re: hints about learning Hibernate

    Thx for each reply.

  6. #6
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    390
    Rep Power
    4

    Default Re: hints about learning Hibernate

    famous last words: When Jim and Tolls talked about JDBC and collections, they included Streams in the back of their minds. Streams are a fundamental tool these days.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: hints about learning Hibernate

    Streams?
    Pah..
    New fangled...mutter...kids these days...mumble...I remember when all this was fields...



    (Tolls currently stuck in a place that's still on 7...bah!)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    390
    Rep Power
    4

    Default Re: hints about learning Hibernate

    Well, at least you have something to look forward to. Streams, Lambdas, all kinds of neat stuff. Streams come in very handy with db- interaction, but they do not improve readability of the code.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: hints about learning Hibernate

    It's worse than that.
    My prior two clients were on 8.
    This is like the dark ages here...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  10. #10
    marchello is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Talking Re: hints about learning Hibernate

    As I was too curious to wait till I finish Java Core (6/10 already btw) & Java Collections, I just started my "JDBC and MySQL" Udemy course and was able to configure the environment to run code below. I would say, I can do it :) Though there are many, many days of learning ahead.
    Java Code:
    import java.sql.*;
    
    public class JdbcTest {
    
    	public static void main(String[] args) throws SQLException {
    
    		Connection myConn = null;
    		Statement myStmt = null;
    		ResultSet myRs = null;
    		
    		try {
    			// 1. Get a connection to database
    			myConn = DriverManager.getConnection("jdbc:mysql://localhost:3306/demo", "student" , "student");
    			
    			System.out.println("Database connection successful!\n");
    			
    			// 2. Create a statement
    			myStmt = myConn.createStatement();
    			
    			// 3. Execute SQL query
    			myRs = myStmt.executeQuery("select * from employees where last_name like '%u%'");
    			
    			// 4. Process the result set
    			while (myRs.next()) {
    				System.out.println(myRs.getString("last_name") + ", " + myRs.getString("first_name"));
    			}
    		}
    		catch (Exception exc) {
    			exc.printStackTrace();
    		}
    		finally {
    			if (myRs != null) {
    				myRs.close();
    			}
    			
    			if (myStmt != null) {
    				myStmt.close();
    			}
    			
    			if (myConn != null) {
    				myConn.close();
    			}
    		}
    	}
    
    }
    Last edited by marchello; 10-30-2017 at 01:28 PM.

Similar Threads

  1. Arrays-Poker Simulation Methods help/hints
    By NoobieCode in forum New To Java
    Replies: 6
    Last Post: 04-10-2013, 11:26 AM
  2. [ask] why doesn't eclipse show hints?
    By aegean247 in forum Eclipse
    Replies: 0
    Last Post: 08-29-2011, 08:51 PM
  3. Eclipse DropDown Hints
    By maknib in forum New To Java
    Replies: 1
    Last Post: 03-10-2011, 09:11 AM
  4. Hints on how to make a Java Class
    By luron31 in forum New To Java
    Replies: 11
    Last Post: 07-09-2009, 05:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •