views:

94

answers:

4

Together with another developer, I have embarked on a journey to create a hosted 'CRM Style' application that will cater to enterprise level businesses. These businesses will be accessing our application remotely and so the hosted nature of the application will require certain features. For example, to guarantee a level of professional service the following things must be true:

  • internationalization requires multiple languages and presentation of date/time for various timezones and locales
  • transactional capability for batch processing of tasks and rollback capabilities
  • security concerns for keeping data safe and remote invocations secure from attack
  • etcetera, the list goes on and on

Due to these concerns and my role as the developer most responsible for the server side development, I am very interested in the choices I make early on. Regarding timezones and languages for example, are there issues related to my choice of database or data fields? Do I choose to use a UTC timestamp or date field throughout the application and if so is there a standard format for that? Also, regarding different languages, am I supposed to ensure the data is stored in the database as UTF-8 or unicode?

I really want to avoid laying down the infustructure of the system only to discover later that a fundamental decision was incorrect or not big enough, wide enough, smart enough, etc. Can someone point me in the right direction regarding these basic 'early' decisions?

EDIT _ Ok I appreciate the broad responses and now I see my question was a little too non-specific. I'd like to focus on the more specific elements that WERE present in the question, such as how to choose the proper format for storing a UTC Date/Time or how to save my text data (do I specify a UTF format?)

A: 

If you are targeting enterprise CRM, then you will need a very high level of customizability and integrations with all kinds of systems. You will make mistakes in the design. Your only hope is to isolate each little piece of the code so that you can have a chance of fixing it later.

In short, basic software engineering principles are your best bet.

BioBuckyBall
Brilliant. Good way to say something without answering any of my questions whatsoever.
Matt1776
@Matt1776 - He did answer your (rather broad) question (+1 from me). You want to avoid making mistakes? Well you can't on a non trivial project. Your only choice is to design your project to make as easy to fix as possible **when** (not if) something goes wrong.
Nifle
A: 

As you have not mentioned what you think about the issue, you may find my answer or parts of it rather basic.

  1. If you don't need to, don't use a low-level language. I'd use python usually for the first version of a CRM application (with the hope that it would be good enough for the next versions), but this decision depends also on the domain community.
  2. Try to write the minimal code on your own, instead relying on the third-party libraries. People may disagree on this, but I would write the code myself as the last option. But the next point is important.
  3. When selecting a library/framework to use, make sure the party behind it is going to last, the library is stable and the software license suits you needs.
  4. Other general rules apply: focus on the customer, use continuous integration/testing, etc., use good software practices like logging etc.
Amit Kumar
By language I was referring to the localization - the user's native language. I agree on these points, but I was looking for specific tips regarding data storage for 'languages' and 'date/time' objects.
Matt1776
A: 

Nothing is ever stored as "unicode" because this is an abstract concept. Unicode is always stored in some kind of unicode transformation format (UTF) (well or UCS but I never saw that used somewhere). The most commonly used UTF is UTF-8 but I suggest to use what is native/default to your platform. wikipedia

panzi
Thank you for the information
Matt1776
+1  A: 

What you are discussing is called a multi-tenant application wherein you have the same code base used by multiple customers (tenants) with logical or physical separation of data. Remember the fundamental rule of development: flexibility is relational to complexity. The more flexible you make the system, the more complicated it will be.

RE: UTC

For a CRM application that stores things like when calls were made and when meetings took place, I would definitely store all those in UTC and let the user set their local timezone. However, you might run into dates which are timezone agnostic and for those, I would store whatever date was entered.

RE: Unicode

Yes, I would use Unicode for all user-entered data. However, that will not get you localization. If for a single company for example, you have a user in Hong Kong entering text in Chinese and user in Amsterdam entering text in Dutch, you are not going to get automatic translation. Things like dates and number formats can be localized, but raw text like names used in drop lists and such can be a chore to localize.

Thomas
Thank you Thomas - you were the only one who understood that I simply wanted a straightforward answer, not an editorial on your personal thoughts and feelings toward my ultimate aim. Cheers - I will take this information to good use
Matt1776
@Matt1776 If you had used a more specific headline, likely you would have received other useful answers.
Amit Kumar
I agree - Sometimes I do not realize the exact nature of my question until it has already been asked, but this is a bad habit and I could easily utilize the 'edit' button.
Matt1776