Results 1 to 7 of 7

Thread: Help Required

  1. #1
    Adil Zaheer is offline Member
    Join Date
    May 2014
    Posts
    1
    Rep Power
    0

    Default Help Required

    I need to create a software in java
    1. Build images database and;
    2. Find these images by name and;
    3. When name entered requested image pops-up.

    Need suggestions on how can i make a overwhelming simple software.

    Looking Forward

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Help Required

    What did you do so far? Where do you have problems where we might help you?

    Without details at least I do not know where I could help you (I hope you do not expect us to do all the work for you).

  3. #3
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Re: Help Required

    Create an array of buffered images and then use a text field or something to get the users input of what image they want to see then just draw the image

  4. #4
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Help Required

    An array of buffered images is something that I really wouldn't recommend at all. Images require a lot of memory so it is never a good idea to keep more images in memory than really required.

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,023
    Rep Power
    6

    Default Re: Help Required

    Whatever DB solution you use, if you want to keep them in memory, you could do so in a List or Map of SoftReferences<Image>. You can create them lazily and then access them as appropriate. If the Image target is null, then remove it from the list or map and reload it. You could also employ a reference queue to help with this.

    Regards,
    Jim
    Last edited by jim829; 05-11-2014 at 11:57 PM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Re: Help Required

    Quote Originally Posted by kneitzel View Post
    An array of buffered images is something that I really wouldn't recommend at all. Images require a lot of memory so it is never a good idea to keep more images in memory than really required.
    So just link the location of the image and buffer it when the user requests it?

  7. #7
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Help Required

    It often depends on the requirements. We don't know much. One point that was given was a request of a picture database. So if a database is requested, then it could be nice to have a database. But what kind of data should be stored? What information do we have? Are there connections between 'records'? How much data should be stored. Who should access it?
    So database could be a simple file (e.g. sqlite) over a real database (e.g. mysql, oracle, ...) up to non relational databases ...

    But database sounds already like a big set and only single pictures seems to be requested. So I really like the database approach because then we have less work. Databases come with a lot of things already e.g. indexes, good memory management, performance optimization, ..... And a lot of things are simply not possible with java (e.g. direct disk access without using file systems or great system optimizations... java is more or less limited to the JVM and has a GC which comes with a performance impact.)

    The second point could be a standard database query.

    The third and last point is also nothing special. What behaviour is expected?
    So if it is a web application and I expect that single pages get a lot of hitsm then I would use some caching of data. Maybe people want to move forward/backwards. Then a statefull client (java app/applet) could load data in the background to speed things up ...

    It is really important to know more before I can suggest a solution. My first step might be a simple standard solution just with a first set of features. (So caching or preloading are additional story cards and I would keep them separate first. But in a talk with the customer/product owner I would write down such backlog items even if they stay outside the sprint (We use SCRUM ... hope you don't mind that I used some wording from this area)

    Just a few thoughts from my side. But it is really just some guessing. Even loading all images might be a solution (so the number of images might be limited, load time might be out of scope, systems have a lot of memory and switching pictures must be really fast so disk io is bad...) but that must be really planed and my first thought about your idea with a list of images was, that this is something that I saw multiple times in the past - when people complained about out of memory exceptions.

    With kind regards,

    Konrad

Similar Threads

  1. help required
    By faruk.arshad in forum Advanced Java
    Replies: 1
    Last Post: 10-08-2011, 08:55 AM
  2. Help required!!!!
    By sat27 in forum Threads and Synchronization
    Replies: 2
    Last Post: 12-06-2009, 12:29 AM
  3. help required
    By anny051 in forum New To Java
    Replies: 2
    Last Post: 07-31-2009, 05:05 AM
  4. Help required
    By Azndaddy in forum New To Java
    Replies: 0
    Last Post: 03-27-2008, 02:57 AM
  5. Blx.tld required
    By anki1234 in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 01-24-2008, 05:17 AM

Posting Permissions

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