I'm tired of writing JDBC DAO for database access. It is tedious and repetitive work. Why can't you use JPA? Not every data model can be covered with JPA.
After some research I've found out the project Telosys tools. It allows you to generate the JDBC DAO.
What can it offer for free? It's open source :-).
It provides you an Eclipse plugin and templates. Templates can be found here.
Also it has a good documentation. About five minutes and you can find out how to use it.
What you get is a free time.
This blog is a collection of minds around linux, java, javascript, etc. Looking for great opportunities.
среда, 29 апреля 2015 г.
Convert XSD to sql with Altova XmlSpy 2011
Sometimes you got a task to parse xml and load it into database. The xml conforms to xml schema.
You have to create the sql for the xsd. How to do it?
XmlSpy has the ability to convert xsd into sql. Well, it claims to support DB2.
So, the surprise was that XmlSpy uses ODBC driver. That's a big surprise. Ok.
After after some processing XmlSpy figured out the sql, but... all attributes were VARGRAPHIC.
XmlSpy allows you to change the sql types, but it is a lot of work.
That is very strange behavior, because in XSD was already signed the standard XML schema types.
At least, I've got a start sql to work with...
You have to create the sql for the xsd. How to do it?
XmlSpy has the ability to convert xsd into sql. Well, it claims to support DB2.
So, the surprise was that XmlSpy uses ODBC driver. That's a big surprise. Ok.
After after some processing XmlSpy figured out the sql, but... all attributes were VARGRAPHIC.
XmlSpy allows you to change the sql types, but it is a lot of work.
That is very strange behavior, because in XSD was already signed the standard XML schema types.
At least, I've got a start sql to work with...
вторник, 28 апреля 2015 г.
Bugs in your code
"The software industry average is 15 to 50 bugs per 1,000 lines of code."
This is quotation from the book SQL Antipatterns: Avoiding the Pitfalls of Database Programming (p. 71).
I don't know how did they get the results, but info is rather curious.
Do you know how many bugs in you code?
This is quotation from the book SQL Antipatterns: Avoiding the Pitfalls of Database Programming (p. 71).
I don't know how did they get the results, but info is rather curious.
Do you know how many bugs in you code?
четверг, 23 апреля 2015 г.
Last read book: Mastering Apache Maven 3
Just have finished reading Mastering Apache Maven 3.
Although this is a step by step guide and contains a lot of examples this book is more a reference guide.
Although this is a step by step guide and contains a lot of examples this book is more a reference guide.
понедельник, 6 апреля 2015 г.
WebSphere Application Server 8.5 Jax-rs annotations support.
WebSphere Application Server 8.5 Jax-rs supports Jackson 1.
The Jackson library is included in the runtime environment of the product. You do not need to bundle any additional libraries.
The Jackson library is included in the runtime environment of the product. You do not need to bundle any additional libraries.
The following Jackson annotations
are supported and can be used to annotation POJOs:
org.codehaus.jackson.annotate.JsonAnySetter
org.codehaus.jackson.annotate.JsonAutoDetect
org.codehaus.jackson.annotate.JsonClass
org.codehaus.jackson.annotate.JsonContentClass
org.codehaus.jackson.annotate.JsonCreator
org.codehaus.jackson.annotate.JsonGetter
org.codehaus.jackson.annotate.JsonIgnore
org.codehaus.jackson.annotate.JsonIgnoreProperties
org.codehaus.jackson.annotate.JsonKeyClass
org.codehaus.jackson.annotate.JsonProperty
org.codehaus.jackson.annotate.JsonPropertyOrder
org.codehaus.jackson.annotate.JsonSetter
org.codehaus.jackson.annotate.JsonSubTypes
org.codehaus.jackson.annotate.JsonSubTypes.Type
org.codehaus.jackson.annotate.JsonTypeInfo
org.codehaus.jackson.annotate.JsonTypeName
org.codehaus.jackson.annotate.JsonValue
org.codehaus.jackson.annotate.JsonWriteNullProperties
org.codehaus.jackson.map.annotate.JsonCachable
org.codehaus.jackson.map.annotate.JsonDeserialize
org.codehaus.jackson.map.annotate.JsonSerialize
org.codehaus.jackson.map.annotate.JsonTypeIdResolver
org.codehaus.jackson.map.annotate.JsonTypeResolver
org.codehaus.jackson.map.annotate.JsonView
четверг, 12 марта 2015 г.
Backbone.js. Remove model from collection without a reference to collection.
What if you have a model in a collection and in a model view you need to remove model from the collection. You can call destroy method on a model, but this will trigger the ajax delete method to the server.
Well, you can trigger the destroy event on a model like this: this.model.trigger('destroy',this.model).
And you model will be deleted from the collection and no DELETE method will be sent to the server.
Well, you can trigger the destroy event on a model like this: this.model.trigger('destroy',this.model).
And you model will be deleted from the collection and no DELETE method will be sent to the server.
понедельник, 2 марта 2015 г.
Joel Spolsky. And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity
The world of IT is not about programming. This is all about making money. To stay profitable companies should understand the clients needs. Who can understand the clients needs better: programmers or program managers? How the development process should be organized? How the company's internal process should be organized? Should managers be on the way of programmers and throw away all the written code and start from the ground?
Some answers to this questions can be found in the book Joel on Software: And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity . Although is a bit outdated it is still actual. It is actual because it contains the description of people errors and relations between people in it-business.
Personally, here are some minds I like:
The desire for rewriting program from scratch is in inverse proportion to the experience of the programmers.
The most important ability of program manager - is to learn how to make programmers do what he needs by convincing them as this was their own idea.
Some answers to this questions can be found in the book Joel on Software: And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity . Although is a bit outdated it is still actual. It is actual because it contains the description of people errors and relations between people in it-business.
Personally, here are some minds I like:
The desire for rewriting program from scratch is in inverse proportion to the experience of the programmers.
The most important ability of program manager - is to learn how to make programmers do what he needs by convincing them as this was their own idea.
понедельник, 23 февраля 2015 г.
Last read book: Functional JavaScript Introducing Functional Programming with Underscore.js
During reading the documentation on underscore.js I found out the link to the book Functional javascript. For a long time I had postponed the learning of this theme and now I can fill the gap in my knowledge of functional programming and javascript techniques.
This book has positive and negative reviews, but in my opinion this book is more of a practical approach. Can I recommend to to anyone? In my opinion, yes. Of course, you cannot master the functional programming only by this book. It gives you a lot of information and directions in where to find more information.
What I like about this book is a good bibliography and a reference to useful javascript libraries.
This book has positive and negative reviews, but in my opinion this book is more of a practical approach. Can I recommend to to anyone? In my opinion, yes. Of course, you cannot master the functional programming only by this book. It gives you a lot of information and directions in where to find more information.
What I like about this book is a good bibliography and a reference to useful javascript libraries.
воскресенье, 22 февраля 2015 г.
Unit testing EJB3
One thing I like EJB3 is the use of annotations. So, if you want to unit test your EJB you can use the annotations and reflective programming to mock the dependencies and inject them.
Подписаться на:
Сообщения (Atom)