As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've seen internationalization implemented in a classic ASP shopping cart as a most-massive monolithic dictionary of (int,String) key-value pairs, where the calling code passed the dictionary an integer representing which string was to be returned (binary-ORed with the desired language id) and the value for each unique int was the "internationalized" string.
This seems like a very, very, very horrible way to implement i18n.
I'm in the "pre-design" (if there is such a thing) phase for a Java-based Swing application that I would want to be internationalized. Not that I speak anything other than English (ha!) but it would be nice to expand into other languages in the future without having to refactor 20,000 strings.
So, this begs the question: what are the best practices surrounding Java-based i18n (and L10n for that matter)? What sort of classes & structures are used? Obviously, if this winds up as one big com.myproject.i18n package with an "Internationalizer" class as the common gateway for the rest of my code, I would want this to be a singleton class, yes?
Just a request for some food-for-thought here, any nudges in the right direction are greatly appreciated :-)
The idea is to work around properties files. They are easy to work with and you can extend this system easily.
You can find a nice answer here.
Netbeans have also a great sample tutorial.
After you get your languages right, you will need software to switch locales, localize dates and amounts etc. Kai Toedter' tools are very reliable. You can add these beans to your IDE and drag and drop them to your JPanels.
You can create your property file and insert them into iL10Nz.
In order to evoid context issues, it is good to have a scrrenshot for each strings that you are progressively creating. This will pay off with the languages you will translate into
Check http://www.myl10n.net
You can take a look at Gettext Commons. It's i18n in gettext-way for Java. It has Maven plugin for generating, updating and compiling PO files. Personally after some time of use found it's easier to go with standard ResourceBundles.
i using netbeans for developing GUI application based on Swing Application Framework [SAF]
and you can get powerful tools for internationalizing Project on Netbeans IDE.
look at this article : Internationalizing a GUI Form
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Files will ship with bugs, and companies will always want to provide new features. There must
be a way to distribute new files with the hope that the applications will work just fine. And if the application doesn't work fine, there has to be an easy way to restore the application to its last-known good state.
I know this will be general question but I think that is also a general problem.
Comparisons of the solution in different platforms will be amassing.
Dear friends, Actually I am not talking about How to develop software,
Its about How to deploy software with minimum side effects on end users machine
(should be step 0, or -1) use a capable source code management tool, and use it to its full potential: especially branching)
Test Driven Development - always have tests for what you can test, and design code to be testable (to the point it is feasible, of course.)
never do any of these two the same time:
refactoring
introducing new features
fixing a bug
use continuous integration wherever possible
Reverting to "last stable" release in case of emergency
This must be supported by some infrastructural decisions, like keeping around the last stable release compiled and ready to be redeployed if something goes awry despite the efforts (been there, done that)
You should do unit testing. That's a good solution to avoid and track regressions.
But you can't just fast make a change in a big application and build a test unit ensuring everything is OK. You have to make a bunch of test units.
Which is costly, but there is no cheap way to ensure an application is bug free. The only solution is to dedicate a lot of work to testing, be it using unit testing or human testers or both. There's emphasis on that point in Joel Test because a serious team must spend enough in testing.
Restoring an application to an old state is just having a good version control system and not a mess with configuration and data parts. Some VCS have tools to help you find when a bug occured, for example git-bisect.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
so I have been through all the courses on programming, algorithms, etc. and did a lot of coding and some small projects.
Now, I may start working on a real project, real java SE program with gui and everything, not big, but much more complicated than average school project. My experience says that when I'm having more classes in my project (say 10), it kind of gets difficult to decide from where this constructor should be called, if I should pass this parameter here or create it later and how the whole thing should work together.
can you recommend me some resources on this? Should I go the way of studying the design patterns or how do I get to design apps that have nice architecture?
what is the procedure when developing an app with lots of classes and gui and so on?
thanks a lot
Design patterns usually help in making an application more maintainable and also more flexible. Although which design patterns to use relies essentially on what type of problem you have.
I did go through this book, which provided me with a quick and easy way to grasp what design patterns are and how they work.
Since you are dealing with GUI related applications, my only recommendation would be to try and make your GUI and Logic seperate. This should reduce clutter and should make your code more understandable since each class deals with items related to its layer (GIU or Logic).
Breaking things down also makes your application more flexible and reusable. Cohesion vs Coupling should also be another thing which you should keep in mind.
For design patterns : Head First Design Patterns & Design Patterns: Elements-Reusable-Object-Oriented
For Effective Programming Guidelines : Recommended reading Joshua Bloch's Effective Java
I personally like to thing in a TDD approach and love to read this blog Writing Testable Code by Misko Hevery.
It explains how should we focus on making code loosely coupled and testable.
And lastly keep exploring open source libraries and projects they will keep you up to date with latest trends and coding styles.
Head first Design Patterns or even the original Design patterns book from the Gang of Four (if you are the kind of person who likes more direct theory) for application design and I think it may be useful for you to have some knowledge of enterprise design patterns (Enterprise Integration Patterns from Hohpe and Wolf) will help you to understand how to implement flexible communication even in small SE projects. (Even these systems needs sometimes some kind of interprocess communication).
Additionally, the answers of Narendra and npinti are very good advices as well.
Have fun!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am going to work on an complex application.Application is about to create lakhs of form dynamically, on those form rules can be apply dynamically and transactions of that forms.
For this application points that must be keep in mind are below:
1.Fast Loading:
1.1 Intial application load time must be smaller.
1.2 As there are lacs of forms then controls many in count of lakhs of lakhs with all properties.So while fetching forms from DB it should be fast.
2.Control Richness:
Which ever frame work used, It should be rich in controls, Control like:Date, Date Time Picker, Grid,TextBox,TextAera,Combox etc.
3.Browser Comapibilty
It should be compatible with all browser.
4.Resolution Indepedance
Application should be resolution independent.i.e It should work for every resolution and for every browser.
5.Mobile Compatibility
For this purpose I just started with a demo application.For this I selected GWT2.0.3 + gwt-ext,Hibernate
Hibernate is satisfying all the need regarding back end.But I am not satisfied with GWT as there loading issues,Browser issuse.
So I just need assistance for selecting frame work.Please also suggest me about the pattern
i.e. MVP,MVC.
I also searched abut spring framework But not much aware of it.
So please suggest me regarding this.
I am surprised you found issues with GWT. Personally I feel, it is one of the cleanest front-end implementations. (did you face issues integrating it with hybernate maybe?)
Anyways, another framework that is java style based (extends gwt and is richer) is Smart GWT that you can look into. I did a detailed comparison here which answers your questions - GWT,Smart GWT,GWT-ext comparison
If you are not looking for a java style based front end, you should look at jQuery too. http://jquery.com/. It even has a version optimized for touch http://jquerymobile.com/
EDIT -
1) You could even look at flex, which is a flash based. http://www.adobe.com/products/flex/
2) Also, if web based forms is the major area, look at Grails http://www.grails.org/
Point 1. Since you consider using Hibernate try "Extra‐lazy" collection fetching and lazy attribute fetching. The elements of the collection are accessed from the database as needed. I think it is a configuration issue to start up faster.
You will probably get faster startup if you use JDBC instead, but Hibernate will cut a lot of development time.
Also the JavaScript files containing your client application may take a lot of initial time to load, so split your application in smaller parts.
and 2. GWT covers your Control Richness issues and gives you a fairly reasonable Browser Compatibility. Gives you everything you have in a desktop Java Application.
About "all browsers": You can not have GUI Richness and Netscape 1.0 compatibility. JavaScript was not invented before Netscape 2.0
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I need something that is competitive to Volusion/Magento in terms of features. Cost is not an issue.
Thanks
I've been watching the situation around shopping carts for past 5 years very closely. Imho the only carts that are worth trying :
jadasite
konakart
shopizer
Broadleaf Commerce
ofbiz
I've used all of them now. The first 3 are sort of out-of-the-box. I prefer jadasite and shopizer, because they are opensource projects and you have all the Konakart's paid features for free in Jadasite. And from what I know they are even better. You can install these shopping carts and go.
If you are skilled developer and want to spend a month or two playing with a nice technology, or you need a solution for a middle - big businesses, try ofbiz, because ofbiz gives you a platform for building enterprise class e-commerce solution.
Finally, Broadleaf Commerce is somewhere in the middle. I blogged about it recently. Great technology stack, very experienced project lead. You have to have at least a year of java dev experience, because the way of integration and customization has "integration" nature, based on Spring beans/services/controllers or persistence entities overriding/merging/adding ... But it is very simple principle and I was able to work on a custom shopping cart even the same day when I checked out the code from svn.
http://ofbiz.apache.org/
ofbiz includes;
Open Source ERP, Open Source CRM, Open Source E-Business / E-Commerce, Open Source SCM, Open Source MRP, Open Source CMMS/EAM, and so on.
ATG is an outstanding package. It is highly extensible, completely skinnable and very scalable. It is used by many of the largest online retailers, has a strong network of partners and support is quite good. ATG provide training courses for developers and architectural consultancy services. It includes integrations with advanced search, CRM, trouble ticketing and many allied functions.
All that having been said, it is closed-source, obtuse, complex, expensive and has a steep learning curve. It uses a proprietary ORM that mimics Hibernate and other language constructs that parallel J2EE or Spring such as dependency injection, but in it's own special way. Don't assume that your average J2EE or Spring developer will be able to pick it up quickly.
You do need to be careful of some of ATG's implementation partners, some of them are stacked with developers that have barely completed the standard ATG training program and you would be better off training your own staff. Check their references and make sure you actually speak to past clients.
Standard disclaimers apply, I have no affiliation with ATG, caveat emptor.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am trying to use Spring for the first time in an application. The general issue that comes up repeatedly is how to debug Spring. The framework is configuration heavy so traditional code debugging seems fruitless. I have no real idea how to go about troubleshooting short of turning on the debugging level logs (which are lacking) and scanning through.
Are there any general tips or tools to assist Spring debugging?
If you're using Eclipse, then get hold of the Spring IDE (available from the Eclipse Marketplace within the Help menu of Eclipse). This will provide code-completion, bean visualisation, and hot-linking to your config files.
I don't think Spring debugging should be any different to any other debugging scenario.
What aspects of Spring are you using ? If you're using dependency injection properly, then I wouldn't anticipate any problems.
However if you're dynamically resolving beans via their name (at runtime, using ApplicationContext.getBean()) then I can see that's going to cause you problems anticipating flow of control etc., and would suggest that you revisit your IoC.
EDIT: It's quite useful to have the Spring source code available. It's well put together and quite readable, and therefore possibly of use when debugging.
I generally just use the java debugger in eclipse - it works fine on most classes. Some classes are wrapped at compile/runtime by bytecode changes - for these you generally cannot put breakpoints in methods, however you can set a breakpoint at method entry.
If you have a very specific situation you maybe should elaborate a bit in your question.
I'm generally also ok with the logging levels - what do you think is wrong with them?
As of 09/2011 (Version: 2.6.1.RELEASE, Build Id: 201105041000) a real annoyance is the fact that the debugger doesn't stop inside closures, so you have to remember to put a breakpoint inside the ones you want to examine; that is fine as it is "almost" going to a different class which a lot of time doens't matter, but when it does, you have to remember that.