To get the full name, the containing type allows to resolve the simple name. IType#resolveType(String) transforms this simple name using the imports of the containing type. The result is an array with two dimensions. The first one is for the case where there are multiple answers possible. The second one separates the name of the package and the simple name.
The following code returns the first full name of a method return type:
Web components are custom HTML tags. How is the behavior and rendering of such elements defined ?
The components definition relies by convenience on another W3C recommendation,
Introduced as a new link type (import) the principle is simple. This allows to include an external resource into an HTML resource. The practice for Web components is to use an included resource defining the behavior of each custom element in order to allow reuse of that definition. Web components could of course be defined without imports but this would be of limited interest. A singularity about HTML imports is detailed in a
defining multiple imports using a same library (e.g. jQuery) can be challenging to load for browsers. Strategies have to be found to reduce loadings.
One important point is in the naming of custom element. As explained in
each name should contain a dash in order to avoid conflicts with standard HTML elements (which are still important because needed in the definition of custom elements).
In the introduction, Bidelman</meta> states that every framework is compatible with
Indeed, as a result of the document structure simplification induced by Web components, this is a huge change in the way information is provided on the Web. This won't change so much for end users in the first place.
On a software engineering point of view, the step could be a real revolution: information provided by the Web server could have a same structure for a Web browser and for any software client. HTML would really look like an XML document, except for the head imports.
What will make the real success of Web components is the behavior of software giants. And with Polymer, Google seems to be seriously involved. Could it be a serious move to use Web standards in replacement of any Android API challenged by the Oracle lawsuit ? Perhaps the end of the mobile native / Web apps dichotomy ? Is it a dream ? Still a long way to go for involved engineers, but so many promises...
Edit(2014-12-26): the platform.js script has becomewebcomponents.js.
The point is clearly about programming practice. In February 2014, Apple faced an SSL bug. This was a very simple code mistake due to conditional sequences.
Because of the conditional aspect, we easily focus on curly braces. Two comments suggested the solution to such a problem could be about test cases (both articles provide simple code extracts of the guilty section):
For sure, testing is an important point in code quality. In an ideal world there would be a test case for any code piece. For sure, there are excellent other tools. I previously wrote about design by contract.
Coding a verified program,
is also an important topic.
When it comes to software quality, I won't say any practice is inappropriate.
Stop dreaming about a world with perfect programs. Let the code verification/prove apart and come back to the code. Adam Langley also suggests code reviews are important. Curly braces ? Perhaps the point isn't central. What matter is a readable code.
Some interesting code conventions exist, especially in large organizations such as Google (the naming section is especially interesting). But is respecting rules enough ? Many programmers write endless code sequences. What could be the solution ?
We, French people, tend to be very verbose in our texts. At school, we are taught to be concise. We do not succeed in any case. How would it be possible in code ? Think about Twitter 140 characters. Just consider what a French journalist could write in 2011. Nowadays, very few journalists still criticize the system. Conciseness can be very precious.
When it comes to quality control, human verifications are weak. I think the twitter limitation is an interesting idea. In writing programs, we have the advantage of compilation to induce strict checking. Why don't compilers warn when a function exceeds 100 lines (or any number that suits you, to be honest the guilty section is only 80 lines long) ? At first glance, this is not the exact topic because this would not have prevented programmers from coding that bug. In broader sight, I tend to think the solution to that kind of problem is in static checking. It won't be possible to automatically test any piece of written code, or even review it properly.
After some (bad) experiences, I am quite sceptical about MVC
frameworks. The hall of fame has accepted a few names: Struts, Play, Wicket... And then ?
Each period has its champion. Struts, as one of the elders, had a long period. So many developers had to use it. But what about software maintenance and evolutions ? Software dependencies between the model, the view and the controller can make moves very challenging. Struts 1 upgrade to version 2 ? What about moving to another technology ?
Quite a nightmare, it is sometimes easier to rewrite completely
the application. In my point of view, long term solutions rely directly on the
Java platform. The classic Servlet
/ JSP tandem
is not an MVC implementation but is plain and simple and evolutions are
easy. I understand JSF
enthusiasts. The solution is modern and interesting on a productivity
point of view. I have a personal problem with JSF (and others
share my opinion) : JSF and JSP are bad companions. What a shame for
While the RESTful architectural style is trendy, the idea of
and JSPs is interesting (part
of Jersey). Hope it will be part of the core specification someday.
Edit(2014-08-21) : the JAX-RS / MVC integration was part of the
JSR 339 initial request but was dismissed in the final specification.
A recent message on the
specification list let me have some hope...