|
Thanks David.
Wow, you used a lot of words a phrases there I've never heard before.
It's good news (I think) that I can use my OO knowledge with standard RDB tables to store the data because I already have a working model in Access and I understand a little about OOP. How do I decide what language, db, gui, toolbox, etc to use keeping in mind: 1) I have a little c++ training, 2) need the most stability I can reasonably get, 3) free tools that I can sell if I decide to one day? btw, Windows only compatibility is fine, especially as I'm assuming cross-compatibility requirements would only make finding a solution more difficult.
Thanks again.
modified on Saturday, July 11, 2009 10:34 PM
|
|
|
|
|
Here are some thoughts. (Rather longer than I anticipated!)
If you have a developer edition of Office you can package your .mdb together with a run time version of the
Access engine. This would be the simplest thing to do - I believe it would take care of the MDAC issues but have never used it.
IIRC the license is that you must have the developer edition Office Pro is not valid.
The beauty of Access is that the .mdb file contains everything - user interface (GUI) and data store (i.e. db tables etc).
So the whole app can be self-contained (unless you use linked tables).
If you move from Access then the GUI and and the data store will be separate components that need to talk to each other.
So you have to decide what to use for the data store and what to use for the GUI.
Looking at the data store, main driver for this decision has to be 'What do potential users have on their machines?'
If they have Access why not stick with it? If they don't then some possible options are.
1. Use flat/text files - the traditional (antedeluvian?) way that requires a lot of coding
(having said that, I know of one major UK retailer whose warehouse management system is run using flat files.)
This approach would mean that the users would require nothing special.
However, you would have to think about securing the files so users cannot edit or delete them.
2. Use XML - this is what many would advocate. Essentially they are structured text files on steriods. But that requires learning about XML.
Similar pros and cons to flat file. But there are other benefits and lots of example code on the web.
3. Use an OOP language and the object serialization that is built in.
Not always as easy as it seems but would be self-contained.
4. Use a relational db.
There are some free ones that you could investigate e.g. SQLite, MS SQL Express.
You would need to be able to package and distribute the db with your GUI app, and that might bring problems similar to the MDAC ones with Access.
For the GUI and the ability to communicate with the data store you still have to ask 'What have the users got on their machines?'.
You also have to ask 'What am I comfortable with and how quickly can I get uo to speed?'
These days you're pretty much obliged to use an OOP language. Possible options are:
1. Java - I once heard it described as 'C++ For Dummies' so knowledge of C++ would be helpful.
It's free and cross-platform and there's some nice free IDEs (NetBeans and Eclipse are considered good).
Personally I think it started off being really good but has now added a plethora of classes that make it just too much of a hassle to do simple things.
Users will need the Java Runtime Engine - but that's free (and there's probably a version on their machines - but might need updating).
2. VB.Net - there's a free version (VB 2008 Express) that comes with the Visual Studio IDE (well a cut down version).
It's a 'true' OOP (unlike VB6 which it is related to it as Italian is to Latin).
It's easy to build apps similar to Access ones (especially if you use SQL Server Express as data store).
Requires .Net Framework 3.5. But that's freely available and re-distributable.
3. C# - similar to Java/C++ in syntax. Also a free Express version.
Same pros and cons as VB, more or less.
4. C++ - there's also a free Express version.
Never used it so cannot comment. I expect it's similar to VB/C# in what it provides.
You could also look at Mono - it's an open source implementation of .Net and available for Linux and Wondows.
Never used it but heard good things about it. Tends to lag behind MS .Net since it's always playing catch-up.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks so much for this info. A lot of it is new but some of it fits in and clarifies other things that were foggy.
It may show that I don't really understand what I'm talking about, but, in no particular order:
--I used to support some Access apps that ran on MDAC and Access on various clients and there were always problems coming up. That's why I'm drawn to developing a truly independent program.
--I'm definitely leaning toward an RDB data store instead of an OODB, or the other choices, because I already have a working -though improvable- model of the data in RDB (my existing mdb) and it seems like the "best" way to store number data.
--From this and other info I've read I guess it's a two way tie between C++ (I had the Intro to C++ class) and Python (seems to be widely liked) for the front-end (is this right terminology?) with Java still kind of in the running (don't love that it is dependent on JVM).
--Should I not be concerned about stability or security of using something built on a platform, like JVM or .net?
--Could you talk more about this?: "You would need to be able to package and distribute the db with your GUI app, and that might bring problems similar to the MDAC ones with Access."
--I understand what the language and libraries are, but could you explain why I need toolboxes, wrappers (like wxpython)?
--Regarding IDEs, I found these at http://wiki.python.org/moin/IntegratedDevelopmentEnvironments[^]. How do I choose between "IDEs with introspection-based code completion and integrated debugger" and "IDEs with integrated gui builder"?
And thank you again. I really appreciate your help.
|
|
|
|
|
copec wrote: developing a truly independent program
Not sure you can develop a completely independent program. If you create an executable (i.e. .exe) it will almost certainly depend on some system .dlls - pretty much unavoidable. It will also depend on having an RDBMS (e.g. SQL Server) if you use a relational db.
copec wrote: don't love that it is dependent on JVM
You don't need the JVM on user's machines, just the JRE - at least that's my understanding. If you use C++ to create a .Net app, user's would need the .Net framework installed. I don't know Python so don't know its dependencies.
copec wrote: Should I not be concerned about stability or security of using something built on a platform, like JVM or .net?
These are probably concerns irrespective of platform. How critical they are depends on the nature of the app.
copec wrote: Could you talk more about this?: "You would need to be able to package and distribute the db with your GUI app, and that might bring problems similar to the MDAC ones with Access."
Once the app is created you have to have some means of distributing it. If it comprises a .exe plus supporting .dlls and a rdb back end you have to get them onto the user's machine. With 'traditional' .exes there are issues with differing versions of .dlls (commonly referred to as dlHell, similar to MDAC issues. These have pretty much gone away in .Net - there's no problems with having multiple versions of the same .dll.)
copec wrote: explain why I need toolboxes, wrappers (like wxpython)?
Strictly you don't, if you are prepared to create your own widgets such as buttons, textboxes and comboboxes to populate forms (you would have to create a widget for the form as well). If you take C++ as an example, the language itself does not provide any GUI widgets at all. So to create a GUI you need a toolbox of widgets that you can hook up to. MS Visual Studio provides such a toolbox that's available to any of the languages it supports (true even before .Net e.g. VB6 and VC++). I don't know what the wxpython wrapper does (quick Google says it's a wrapper around a widget toolkit).
So it looks like if you use Python you have to make sure the wxpython wrapper plus the toolkit plus Python runtime (I think it uses a VM like Java since it compiles source to bytecode) is installed on user machine.
copec wrote: How do I choose between "IDEs with introspection-based code completion and integrated debugger" and "IDEs with integrated gui builder"?
Ideally you want an IDE that has auto completion (Intellisense in MS speak), an integrated debugger and a gui builder. This is what VS provides. Which you choose depends on how confident you are with the language. Auto completion is useful (reduces silly typos). An integrated debugger will allow you to step through code line by line to find errors. A GUI builder is almost essential but you could write all the code you need in Notepad - I've done this for simple C# apps but it's a pain. It's just so much easier to drag and drop controls onto a form in the designer than to craft code to place them exactly where you want them to be.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks again, David.
I get your point about dllhell compared with Java or .net, but can't that be avoided also by using unregistered dlls? (I read that somewhere and I don't know the ramifications, I'm just throwing it out there to see what you think).
riced wrote: So it looks like if you use Python you have to make sure the wxpython wrapper plus the toolkit plus Python runtime is installed on user machine.
Would or could this normally be done during the install of the program itself on the client machine?
If I used an IDE other than VS, like say if I used an IDE for Python, like NetBeans for instance. Would I need to gather my "widget toolkits" and plug them into the IDE somehow, or how do you use them from within the IDE? Or does my question show that I don't quite understand?
Thanks.
|
|
|
|
|
You can avoid dllHell by using unregistered dlls, my point was that however you create the app there will still be a need to package its components to get them onto user machines. If the app relies on particular system components (e.g. .Net 3.5 framework, JRE or wxPython) you also need to either get them onto to the machines or abort the installation.
As I said I don't know Python so cannot be specific about what is required. However, I understand Python can be used with a wide variety of toolkits and that there's a large number of IDEs that allow you to develop GUI apps.
I would expect that if you download Python it will give the option of installing a toolkit. If it does not, there's likely to be some info on how to install a toolkit. Once that's done I would expect the IDE to either pick up the toolkit or allow you to hook into it.
You might find that the IDE expects to find a particular toolkit installed (a quick google indicates that wxPython is the toolkit most likely to be supported). Sun was doing something to support Python in NetBeans (as of Nov 2008) but I don't know how far it's got.
BTW if you use NetBeans you need to have Java installed - at least you did when I last used it (about 5 years ago).
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks for the info, David.
I hadn't considered the issue of installation until now, but I see what you mean about how the user would need all necessary components to be able to run the program. At what point during development would I need to start thinking about, and planning, and taking actions for, the installation process of getting all necessary components onto an end user's machine?
|
|
|
|
|
Probably from the start.
If you have a target set of users in mind it is worth finding out what they are likely to have installed. For example if they have .Net 2.0 it would make sense to consider build the app using that framework. There may be good reasons not to do so but then you have to look at having some installation package and the licensing conditions regarding redistribution of the components such as the run time engine (e.g. JRE if you do it in Java).
If you wait until the app is in development you might find that it's difficult or impossible to actually distribute it.
Ideally, you should set up (at least) two machines: one for development and one for production (i.e. to mimic users' machines). You could then install the proposed development platform, build a 'Hello World' app and try to package and install it on the production machine. This would also allow you to test various distribution channels e.g. from CD or via a download from a network.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Maybe some dumb questions here:
1) So there are licensing issues to be dealt with (money?) if I wanted to package the runtime components with the program, all to be installed by the program installer?
2) What about having the installer check for proper runtime software, and if it didn't find it (or a recent enough version), abort the install and tell the user that they need to go download and install the runtime? Maybe even have the installer launch a browser and point it to the install/download page? Is this a viable way of doing it to get around any licensing issues (if I understand what you meant above)?
Thanks again for your help.
modified on Wednesday, July 15, 2009 2:20 PM
|
|
|
|
|
There are possible issues with licenses. Depends on the particular software and whether you go commercial with the product. Some freely available stuff has restrictions on redistribution in commercial products. Another example, IIRC, MS Office Developer had some elements that could only be used for development.
It would probably be a good idea to check for any existing runtime that the app requires. I think the installer should tell the user if any elements are missing - these should be detailed in documentation as prerequisites.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks for all the help, David.
|
|
|
|
|
Thanks for all the help David!
|
|
|
|
|
Hi,
I am developing a webapplication(currently), the web application is supposed to simply add data of employees , their will be different types of people(say 10 types of people) modifying the data in the tables of sql server-2005 their will be say around 15-20 different tables with an average of 10 fields per table.
By architecture I mean assistance in designing the application so that the application may support 50 simultaneous users interacting with the web application simultaneously, how should my sql be engineered because in future their will be massive entries getting in the database say 50,000 or so minimum
in two or three tables.
what kind of design should I use to handle such requirements
thank you
|
|
|
|
|
I'm afraid a forum is not where you are going to get a solution to this question. The question is so broad that it is impossible to answer. I can only suggest you hire a consultant to do your design for you or you could employ a senior developer who could do this fairly easily.
Alternative you need to get a book on database design. One rule you can start with, never store data more in more than in place (this does not include foriegn keys of course).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
HI Mycroft,
Thanks for the suggestion.
|
|
|
|
|
Just to add - whatever design you choose, make sure that you include some form of timestamp on your columns so that you can perform concurrency checking when your users update records - that way, you can easily implement a strategy where you choose who manages to update the record, and what messages are displayed if they can't.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
thanks Pete for your valuable suggestion
|
|
|
|
|
3-Tier architecture can be of great help. If you are developing with .NET then this will become 4-Tire architecture: User Interface, Code Behind, Business Layer, Data Access Layer. Do not make the mistake and design your application architecture exactly the same as database. Remember this, which I read in some text somewhere:
Object oriented programming is not about normalizing data but normalizing behavior.
You know ahead of time you will be interacting with the database so perhaps create utility classes which take a query and execute it, return tables, data readers etc.
Store your connection strings in the .config file.
The only part of your code which should realize this is a web based application is the User Interface and Code Behind files. The rest of your code should be totally ignorant of whether this is a desktop, web or mobile application. This will help in debugging, maintenance etc.
Good Luck!
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
CodingYoshi wrote: Do not make the mistake and design your application architecture exactly the same as database.
Hi Yoshi,
can you please explain what you do you mean here?
Thanks
shank
|
|
|
|
|
I have seen people create classes based on database tables but it is not a good practice. For example lets say I have the table s below:
Customers
Orders
Since this is a many to many relationship, to normalize we will create another table called:
CustomersOrders
This is basically the bridging or link table. Now design classes based on these tables and your design is as below:
Customer Class
Orders Class
CutomerOrders Class
You see what I mean. Instead you should have the following classes:
Person
Customer : Person // If later you need employee you can Employee : Person
// Customer should also have an OrderCollection. Remember Aggregation
Address // Both the Customer's shipping and billing address can use this
CustomerCollection
Order
OrderCollection
You will have classes which have methods for performing CRUD operations on these objects and those classes might call other classes for help. You might have many other properties and methods in your Customer class, in addition to the fields in the database, for example, FullName (First Name + ", " + Last Name), GetPendingInvoices() etc.
Do you see now what I mean?
OrdersCollection
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
Thank You very much Yoshi for your useful information.
I highly appreciate it.
|
|
|
|
|
I'm searching for UML design tool that is also capable of generating and reverse engineering C#. Integration with Visual Studio would be great also. Any suggestions?
For those of you who are familiar with ModelMaker, can you please make a quick comparison with other tools known to you. I used ModelMaker for Delphi Win32 projects a while ago, and it was best choice.
|
|
|
|
|
Enterprise Architect[^] by Embarcadero seems to be gaining good reviews from users. You might want to look into that.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Enterprise Architect looks really impressive. I have tested it, and it's on my shopping list now
Thanks Pete!
|
|
|
|
|
Pete O'Hanlon wrote: Enterprise Architect
I agree, it is a good one. Do you know of any open source ones? Doesn't have to be as good, but something to fiddle with.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|