Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mister_gosh
May 24, 2002

In Java 1.4 or lower, I need to write something that acts sort of like a multi-dimensional String array, but I have no idea how to do it. I'd prefer to use a HashMap which accepts multiple/infinite values. In other words key|value|value|value. I realize that doesn't make sense, let me illustrate.

I have an unpredictable amount of names (of files) and multiple locations that file is stored.

code:
NAME        LOCATION       LOCATION  LOCATION
buyingShoes /en/loc/pub /es/loc/van 
install     /en/ppp     /en/loc      /es/loc
flyGuide    /en         /en/loc/van  /es
If I come upon another location of buyingShoes, I want to be able to find that key and add on an additional location.

In addition, I want to cycle through the entire result set at some point and process each key (name). So I will need some type of foreach loop that cycles through each name and lists each location.

Does anyone have an idea how to do this?

Adbot
ADBOT LOVES YOU

mister_gosh
May 24, 2002

JoeNotCharles posted:

What's wrong with storing a List (or Vector, or whatever Java calls it) as the value for each key of the HashMap?

Thank you captain obvious. No, really, thanks! I was thinking in terms of Strings, but I think I've been too much Perl lately that I forgot I can throw these in any type of object.

mister_gosh
May 24, 2002

Coconut Pete posted:

This is not exactly a programming question, but it is related to programming:

If you are contracted to build a web application, say a CMS or whatever, how do you feel about building it with a framework, such as CodeIgniter for PHP or Django or whatever, not counting if the client specifically requests it?

I've always kind of wondered, do you use CodeIgniter, or since you are selling the application as your own to the client, should you write all of the code by hand? Is using a framework "cheating" when selling an application?

I would think using a framework as a starting point would lessen the bill on their end, wouldn't it? Why reinvent? There will still be customizations and general work you can bill for, I don't see why they would have a problem with it. I don't think you can profit from reselling open source, so I would be careful how you implement and charge (and read the small print of any source package you use).

What I would have a problem with, as a client, is not being presented with a functional specification outlining what you are going to build the framework on (frameworks, languages, etc) prior to you starting your work.

mister_gosh
May 24, 2002

I have a general MVC framework question.

I have a HTML/JSP/Javascript page which renders a page and provides some basic interface, interaction and control.

I then have a servlet which is executed from a button on the page described above.

The servlet sends all information to the core model and service code.

The core stuff executes and sends the response back to the servlet which sends it back to the HTML/JSP/Javascript page.

So my question is, do I have this right?:

HTML/JSP/Javascript page = view
Servlet = controller
Model/Service = model

mister_gosh
May 24, 2002

Not sure which thread this belongs in, crossposting this from web design thread:

I have an application which works best and installs cleanly on Jetty, however I've heard that enterprise ready applications should be on Tomcat and that Jetty is meant for development only.

Is this true or did I hear misinformation? I'm trying to google articles on it but not coming up with much to back it up one way or the other.

The application is a queue broker (apache activemq) and is the only thing the servlet container would be needed for on this server. It is, however, a very important service it is providing.

mister_gosh
May 24, 2002

I have no idea what thread to put this into, I couldn't find a *nix one.

Anyways, I remember back in the day when I could type this at the Linux prompt:

set path1 = `pwd`

and then be able to echo or cd to $path1 no matter where I was. This was useful for areas I was temporarily concerned with, but didn't warrant something like a symbolic link/setting something in my home profile.

Anyways, this no longer works. Am I not remembering this correctly? I'm in the korn shell, if that matters.

mister_gosh
May 24, 2002

Why is everything suddenly being pushed to "the cloud"?

I understand storing media such as mp3's in a cloud so your devices can access them from anywhere. That makes sense.

But I've seen managers asking or pushing this buzzword in areas it perhaps doesn't belong. I've seen technologies rebrand their already existing data colocation/rollover as now Cloud enabled (such as Apache Solr sharding which is now SolrCloud).

Hardware is cheaper these days and the majority of companies tend to like their data onsite rather than at some storage cloud company...and the companies that like that type of service already use such a service before it was called a cloud.

Will this poo poo die down or is there some grand thing I'm not understanding?

mister_gosh
May 24, 2002

Is there a thread in SHSC or CoC where we discuss text editors for coding?

I'm on Windows and am using Sublime 3 (after having switched from Notepad++, Komodo Edit and Textpad) but am wondering about other options/what people are using?

mister_gosh
May 24, 2002

piratepilates posted:

There used to be one here but I'm pretty sure it's in the archives, might have been a year or so ago?

edit: Show off your development environment, there's also been Vim and Emacs threads but come on.

Wow, thanks!

Adbot
ADBOT LOVES YOU

mister_gosh
May 24, 2002

I'm trying to figure out the potential architecture for this problem - I have a filesystem in the cloud (AWS EFS, Azure VM) which I need to be able to browse in a React front-end (present a directory tree). The back-end is Java/Spring.

I would like to not give the keys to the front-end to browse the filesystem directly (plus I'd like to abstract out the type connection type (AWS, Azure, etc)).

I have a rest layer, a persistence layer, services layer, etc. to work with.

I'd prefer using REST, but doing rest calls to build a directory tree sounds buggy and would present latency issues - though I could rely on React to worry about state, I suppose, so maybe it's not so bad.

I'm hesitant to store every file within the persistence layer because only 10% of the files will be relevant to getting deeper info. In other words, there'd be potentially tons of garbage data bogging down the database.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply