I have used MS Money for several years now and due to my "coding interest" it would be great to know where to start learning the basics for programming such an application. Better to say: Its not about how to design and write an application, its about the "bank details". (Just displaying the amount of a certain bank account for the beginning would be a pleasant aim for me.).
I would like to do it in C++ or Java, since I'm used to these languages.
Will it be "too big" for a hobby project? I do not know much about all the security issues, the bank server interfaces/technique, etc.
At the first place after a "no" I need a reliable source for learning.
Most of the apps I've worked with read in a file exported from the bank's website, which is relatively straight forward.
If that's the road you're looking to go down you'll need to write code to:
Login to the bank's website to download the file via HTTPS
Either get specs for the file format or reverse engineer it
Apply whatever business rules you choose to the resulting data
The first thing to remember when trying to programmatically interact with a banking website without express written permission from the bank will MOST LIKELY be a violation of the website use agreement, and may land you in more trouble than it's worth.
Second, you DON'T want to start 'learning' programming by trying to tackle something that massive and sensitive. Not that there is anything wrong with the eventual goal, but that's a journey of a thousand leagues and you need to take your first step.
I would say start with a simple programming environment, like python, or perl. Reason, you don't have to worry about linking, libraries, code generation etc. Get used to the basics of what you want to achieve functionally, them reimplementing that in C++ or Java would be the next step.
To begin with focus on learning client-server programming.
Write a client, write a server, learn all about sockets, learn all about TCP programming,
then learning about secure socket layers (SSL) and transport layer security (TLS).
Once you've done this, try switching to C++ or Java and see if you can repeat the effect.
There are TONS of tutorials on these topics.
Once you have become used to that, learn what tools and libraries are already available to do most common things. For example libcurl is great for creating common internet application protocol clients (HTTP, HTTPS, FTP and the like).
See if you can create an interactive program that you can "log in to" using your web browser which outputs stuff in XML and formats it using cascading style sheets.
This should lead you into javascript world, where there are powerful tools such as jquery. If you mix and match these correctly, you will find that development can be a LOT of fun and quite rapid.
:-)
Happy journeying.
I think its quite a reasonable hobby project; start with a simple ledger and then you can add features.
A few things I would do to begin such a project:
Decide on an initial feature set. A good start might be just one of the ledgers/accounts - basically balancing a checkbook. Make this general enough that you can have several.
Design a data model. What fields will your ledger have? What restrictions on the values of each?
Choose technologies. What language do you want to program in? How will you persist the data? What GUI do you want - a fat client like MS money or a web app?
From there, write up some design notes if warranted and start coding!
You might look into OFX4J, an implementation of the Open Financial Exchange specification, mentioned here and in a comment by #nicerobot.
Are you looking for something mint.com-ish? From my understanding of their security policy this is how they do it: You give them your online account credentials which they give immediately to the bank and get back a "read-only" account login. They then throw away the credentials you provided and use "read-only" credentials to update your metrics every 24 hours. I don't know how they do this or if they have a special relationship with the banks, but it is possible.
I don't think many (if any) banks provides api's.
Online budget-apps in Sweden seem to rely either on exporting transactions in some excel format, or simply have you "mark all transacations in the banksystem, ctrl-c then ctrl-v in a textbox", which is then parses.
Related
My end-of-term assignment is to build a web-based student management application which connects to a MySQL database. However, the teacher does not allow us to use JS/ node because he says it is not OOP. Besides from JS, the members in our group can only use Java.
Therefore, I want to ask if it's it possible to do this assignment with just Java. If it is, what are the things I need to know and learn? Else, is it possible to learn PHP in 1 month for this kind of project?
Thank you very much for reading!
Yes it is possible to write a webserver in Java without any external (i.e. not Java SE) libraries. All you need to do is:
Learn about Socket and ServerSocket and the SSL stack, and ...
Spend a few days reading the HTTP specification in sufficient detail to understand what the protocol requires.
Spend a few more days implementing a server-side HTTP protocol stack and so on.
Which is ... a lot of effort, and probably a waste of you / your team's time.
If you are going to implement this in Java, you would be much better off either learning Spring / SpringMVC / SpringBoot, or learning Servlets and/or JSPs. They deal with the protocol side for you, and (more or less) leave you to focus on the aspects that are specific to your webapp.
These technologies (or equivalents) are what you are likely to use when you graduate.
If the other members of your team already know Java, that would be an obvious good reason to use it.
In short, there are 3 reasons to use Java + the above technologies:
Less effort
Less learning for your other team members1
You / they will be learning more immediately useful things.
PHP would be another alternative, though if your teachers are "down" on Javascript for being "not OO enough", they are probably unlikely to think well of PHP either.
On the topic of whether Javascript is OO or not, read this:
Is JavaScript object-oriented?
Read it and make up your own mind.
1 - How about volunteering to write all of the project's documentation so that you don't have to learn Java. No? You want to learn Java, don't you!
Sure you can write a web app in Java. Depending on what you're allowed to use there are tons of options. Just a short overview, further down means you need more 3rd party code but productivity goes up:
Build in on the JDK only. You'll need to build the WebServer on your own and compose HTML... (Only do this if requirements are strictly forbidding 3rd party libraries)
Use a servlet container like tomcat. You'll still have to build HTML on your own but request handling is mostly done for you. (Use this if a servlet container is all you're allowed to use)
Use a templating engine like JSP, Thymeleafe, Velocity. You will be able to build web pages quite easily. (This would already work conveniently, yet there are still better options)
Use an web application framework. This will take most boilerplate from you and allow you to use advanced concepts with little effort. There are multiple frameworks to choose from. I prefer Spring Boot and would recommend to start with s.th. like this (This will automatically provide much of what is asked from you, so check if you can use such a framework).
I want to make an application in java that has a GUI and a database. I will be using MYSQL as the database and my recent experience with JavaFX has been quite pleasant so that's what I'll be using to code.
My issue is I want user access control and want to show GUI components based on who or what type of user logs in.
So let us say it's a school management system and if a teacher logs in the teacher can access his or her course and homework assignments ( via GUI of course) but not any other teacher's. If an admin user logs in he/she can make changes to student profile, etc. but nothing else.
Could someone point me in the right direction with regards to concepts, tutorials, books, sample code, etc. so I can accomplish something like this
if(user==teacher){
stage.setscene(teacherOnlyScene);
stage.show();
}
Thank you so much! Apologies if its too subjective. This is the one site that I use like 90% of the time for answers to all my programming related questions.
The scope of your question is probably too large to be successfully answered here as you are asking about a fairly sizeable and potentially complex portion of the architecture of your final system. User access systems are generally quite complex especially if they are highly configurable e.g. you can grant users privileges outside their basic group privileges etc.
Before starting to write any code have a think about what you want to achieve. You've already come up with the idea of using user groups which I think is very sensible but there are some questions you need to ask. Can users belong to multiple groups? Can permissions be assigned to users or can they only be assigned to groups? Is the administrator a special case or can it be handled as just another group?
Have a look at the way Linux handles users and groups to assign permissions. It's a very well thought out system should offer some inspiration. Additionally the JavaEE 6 documentation orangegoat linked to provides a good overview of security in Java EE (but be warned it's fairly complex).
Having said that I feel I must encourage you to consider making this a web based application rather than using JavaFX. It doesn't sound like you have any particularly complex graphical requirements and it also sounds like you want multiple concurrent access to the system / database (e.g. more than one teacher can be checking their assignments at a time).
Perhaps I'm a little biased but I think a JavaEE based web application is a better match for these requirements. The business logic and most of the complexity of the multi-user side of things would be handled well by a bunch of EJB's with all the persistence handled by JPA. The GUI would be written in JSF and PrimeFaces and the whole lot hosted on GlassFish. The real benefit of this set up is that you have a zero installation footprint which will save you a ton of time when rolling out new versions. Going the JavaEE route will probably make it more difficult for you but I feel it's the correct solution given the requirements.
I have to implement a simple tour client-server game in Java. Unfortunately, I'm just beginning with network programming and have some problems with choosing an apropriate solution.
Let's assume I'm creating a chess game where two clients can connect to the server, authenticate with their username and passwords and play. The clients must be programmed as applets (thin clients), but I don't know what I should use as a server.
I mean, I've read about several different possibilities like RMI, sockets, servlets, but still don't know which one fits bets my needs. I'm a bit confused because I don't fully understand how the communication would be carried out.
Should I create an executable server which would run all the time on the server and wait for the players? This seems to me like an odd way. Or is there any easier way to do so, e.g. can I make a servlet and put it on Tomcat server so that the server would be run only if there are any players? Could that servlet communicate with applets (clients) and vice versa?*
I'd be really grateful for some tips.
can I make a servlet and put it on Tomcat server so that the server would be run only if there are any players
The Tomcat instance would run anyways, otherwise players couldn't connect to it.
What you could do is to provide a server that starts a new game instance when players connect. The server itself would have to always run.
In terms of technology, I'd suggest you use whatever you feel comfortable with. Don't care about performance yet but try and get started.
So if you already have some knowledge with a communication technology, try and use that. Just be aware of the limitations and take those into account (e.g. message formats, push/pull communication etc.).
It depends what kind of game you are after. Applets are usually good choice for presenting animation (completely in Java) and accessible from a browser. Real world examples would divert towards Flash for client presentation.
If your game is a turn type game (chess, cards etc.), then you can implement your logic in form of servlets or web services or ajax, with appropriate use of hashtables or databases to store live sessions on server side. If your game is more involved in terms of user experience (take an example of Need For Speed type, for instance), then creating a custom server make more sense.
If you are looking for a netwrok application framework in Java then you may consider reading about Apache MINA. Documentation claims that it " helps users develop high performance and high scalability network applications easily." and it has support for various transports such as TCP/IP and UDP/IP via Java NIO. Summary of features can be seen here.
My personal experience with MINA is so far good and used in various projects. One implementation resembles your case, Its not a mulitplayer game but do involves multiple applets connecting a server. I found MINA very good in handling multiple sessions. It do it very neatly. Moreover its very easy to scale and maintain code. Easy to add filters and define protocols.
There are no. of good tutorial available to jump start and initial setup is very easy to do.
However, like any emerging opensource project, it has its problems too. That are: Online community is small and documentation, though improving rapidly, is very limited.
Official user guide covers most of the basics and is a good starting point if you want to know more.
I'm looking for pointers to something that I may be overlooking (or maybe something that Jivebot hasn't yet written for me). What I want is a pre-rolled Java framework for managing user accounts that takes care of most of the common tasks associated with such.
For instance, Jfacets is a good approach to automagic view controlling, but you still have to roll the view code. I wonder if there's a framework that has pre-rolled components for inputting/storing common user profile information, sessioning, and possibly things like inter-account communication, connecting to common social APIs, exposing an API, etc. (basically some/all of the common tasks that a user profile-based app would want). It can be quick and dirty, this is a prototype app at the moment.
I do know that user profiles are a very app-specific arena, and that I may just have to build something up, just thought I'd check first.
In the absence of a pre-rolled solution, I like what I see in Woko after an initial glance (http://woko.wiki.sourceforge.net/). The preconfigured stack includes Hibernate, Spring, Compass, JFacets, Stripes, and Maven and an API framework. I may just need to build the prototype up leveraging this as much as possible.
Thanks
So, it looks like user profiles are just too situation specific for any framework. Shame, because there's a lot of basic functionality that could be served by a basic framework.
On the "solution" front, I'm attending the Open Source Bridge conference in Portland, Or. and recently saw topics on Scala (Two word description: Java scripting) and a framework built on that called Lift (three word description: CodeIgniter for Java). In short, these technologies rock my world.
Anyone looking for robust web frameworks should check out Lift. Scala allows people who love programming in Python and Ruby to use Java's JVM without the cost, with a lot of syntactic elegance (Scala is somewhat more intuitive to my Python-centric mind than Clojure). Lift is a MVC-style framework built on Scala which is just plain beautiful- and frighteningly easy to use.
Normal disclaimers, but the upshot is that it will take significantly less time to build an app-specific solution for a scalable Java app using these technologies than trying to find a user profile framework to use.
we are designing a project that would listen to dialog between airport controllers and pilots to prevent runway incursions (eg. one airplane is taking off while other is crossing the runway). Our professor wants us to use Jena for knowledge base (or anything else but it should be some sort of rule-based engine). Inference is not the main thing in Jena and there's not much documentation and examples of this. So we need an engine that would get messages from pilots as input and output possible risks of incursion or any other error in message protocol. It should be easy to write rules, and should be easy to provide engine with real time data.
I image it something like this:
A pilot sends a message that he lands on some runway, the system remembers that the runway is busy and no one should cross it
If someone is given an instruction to cross this runway, the engine should fire a rule that something is wrong
When the pilot sends a message that he left the runway and goes to the gate, the system clears the runway and lets other planes to use it.
So is Jena, or prolog or any other rules engine suitable for this? I mean it is suitable, but do we really need to use it? I asked the prof. if we could just keep state of the runway and use some simple checks based on messages we receive and he said that it is not scalable and we need the knowledge base. Can someone give me any advise on which approach to use for this system? If you recommend k.b., then which one should we use? The project is written in java.
Thank you.
I would surely recommend ILOG JRULES for your needs. I have been using ILOG JRULES and am really impressed with its performance and accuracy.
Update: Then I would suggest to go for Drools also you might want to check Open Source Rule Engines in Java
A couple of colleagues at work really love the open source Drools.
You could use jena for this, but it's primarily an rdf toolkit. If you're not already using RDF, or familiar with it, then I'd look elsewhere.
Your case is interesting in that it sounds fairly dynamic. Forward chaining reasoners (like Drools) might not be the best choice, since update events will invalidate the deductions. Try something prolog-ish.