![]() | You are viewing Log in Create a LiveJournal Account Learn more | Explore LJ: Life Entertainment Music Culture News & Politics Technology |
20 most recent |
Mon, Jun. 23rd, 2008, 04:47 pm
|
| Alternative | Pros | Cons |
| Wiki | Simple. Easy editing. Easy cross-referencing (hyperlinking). | Only works online. Not really RCS-friendly (Trac has own RCS). "Loose" structure. |
| ReSTructed Text | Simple. Very readable | Syntax is not as easy as it seems. "Loose" structure. |
| XOXO | Simple. Readable. | Designed for ordered or unordered lists, not "definition lists" (a glossary is a special case of definition list). |
| XMLGloss | Specific for glossaries | Specific for glossaries (won't work for other types of documents). License too restrictive |
DocBook provides a system for writing structured documents using SGML or XML. It is particularly well-suited to books and papers about computer hardware and software, though it is by no means limited to them.
In theory, it seems like a perfect match. It has a whole lot of glossary-related elements. It's XML-based, so you can leverage your knowledge about XML. So now, I'm looking for DocBook tutorials, tools, anectodes, and glossary examples.
HttpSession. Then, each JSP has a <jsp:useBean/> tag, which looks for this "operator" bean. If the session has expired, the result is a "InstantiationException: bean operator not found within scope" error.javax.servlet.error.message, which is pretty fragile. The net result is that when the session expires, the user gets a cryptic error page and the app logs an ERROR which is not an error.Google has just announced they're going to federate Google Talk.
Currently, the IM world is like the e-mail world was some 15 years ago. If you had a Fidonet account, you couldn't email someone with a Compuserve account (and vice-versa). SMTP changed that, by routing the e-mail thru as many servers and networks as necessary to reach its intended recipient.
You see, Google Talk uses the XMPP protocol. XMPP was created by the Jabber open-source community, and it can be seen as the SMTP for Instant Messaging, since it implements the concept of federation, or federated identity as Wikipedia calls it. What this means is that you can use your @gmail.com account to IM someone with a @bigcorp.com account. The XMPP protocol is also a lot more network-efficient, because when you IM the guy across the office the message won't be routed all the way to (another country, in my case) the IM provider server.
Jabber users of the world, unite!
Name: The File/Stream Duality
Context: Your API retrieves data from, or writes data to a file
Forces:
- The naive approach is to have the API take in a filename, or a File object to work on.
- Far too many developers believe this is sufficient
- Unless the file is random-access, then in order to read or write to that file, you’re going to have to turn it into a byte stream.
- One day, somebody is going to have a stream of bytes that is not a file, but that they want to pass through your API.
- When that happens, this person will curse you, your parents, and the town you grew up in.
Therefore:
If you are writing an API that takes a filename, instead provide an API that does precisely the same thing to an arbitrary stream of bytes, and then add “convenience” methods that apply those stream-based methods to files.
I've came across this situation when trying to use my co-workers' Pulga (sorry, no link) Avalon container from inside a "One Jar", and Pulga couldn't open its XML config File. If it expected a Stream instead of a File, it'd probably worked straight off.
Our team is currently developing a Java Web application. I've just introduced them to Spring and Hibernate, so learning them both plus a web framework would be too much, so they're using JSP for the presentation layer, since it's closer to what they know (PHP, ASP, etc).
Today, they've asked me how can I access a Spring Bean from inside a JSP page?
. Since I've never worked directly with JSP, I had to research a little. I found a good idiom for it in a post by mfisher in the Spring Framework Support Forums, which I reproduce here:
In general, you should minimize application code's awareness of the beanFactory. Dependencies should be injected in the service layer so that Controllers (Servlets) may use (or delegate to) objects loaded by the beanFactory. Objects may be returned to the view layer, but the views (JSPs) should not access the beanFactory directly to retrieve objects.
All that said, there are ways to access the ApplicationContext via the ServletContext. For using Spring in a web application, there is a ContextLoaderListener which is specified in web.xml as:
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>That will look in the default location of: WEB-INF/applicationContext.xml.
For a different name or location, you need to add:
<context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/someOtherFilename.xml</param-value> </context-param>The ApplicationContext can then be retrieved via the static method:
WebApplicationContextUtils.getWebApplicationContext(servletContext)The accessibility of ApplicationContext via ServletContext is primarily for the purpose of the framework itself, and as mentioned above following "best practice" design will reduce or eliminate the need to acces the beanFactory from within application code.
It makes working with the Windows Command Prompt a little less annoying.is a Win console window enhancement. It was inspired by eConsole. Console features include configurable font, color, size, background image and transparency (on Win2000 and later)
XML Friends Network is a simple way to represent human relationships using hyperlinks. In recent years, blogs and blogrolls have become the fastest growing area of the Web. XFN enables web authors to indicate their relationship(s) to the people in their blogrolls simply by adding a '
rel' attribute to their<a href>tags, e.g.:
<a href="http://jeff.example.org" rel="friend met">...
EXPLAIN QUERY FOR SELECT ... and the like. When I first learned about JOINs in my Database Systems classes, I learned to do natural joins using WHERE clauses, and NATURAL JOIN clauses, and I thought the difference between both were simply clarity and terseness. Since I was typing the queries by hand, I wanted to be as terse as possible.NATURAL JOIN syntax. Googl'ing, I found that it's a SQL92 feature. So I thought: since HSQLDB already supports JOIN syntax, it shouldn't be too hard to make it understand NATURAL JOINs! I added it to the top of my OSS patches To-Do list, let's see if I can give it a go. At the very least, I'll understand a lot more about RDMBSs.JOIN instead of WHERE clauses for joining is faster on (the current version of) HypersonicSQL.
So, last week I left my previous job. The reasons are not worth mentioning, suffice to say that I got tired of working my ass off to that lazy, amateur company, which shall remain anonymous.
Next week I'll start at PUC, which is the University I attended. Seems like really interesting work: they (we) plan to replace most of the current PUC's systems, because they're a 10-year-old-plus Clipper + Cobol + VB + ??? mess. Also, the department (APT) is being re-structured; they don't follow a development process, use source control or anything like that.
It'll be a great challenge, working with Clipper-minded dinassaurs, but it'll also be great fun, and I'll be working with some of the best professors I had, and a good friend (Diogo) with whom I've worked before at InterBusiness.
So, this blog is going to change a bit. I won't be struggling with Hibernate, but with some higher-level problems, abstractions and the like.
I'll try to keep this a little more up-to-date.
Ah, forgot to mention, I'm reading Getting Things Done, by David Allen, and I'm currently looking to buy the "file folders" he mentions so much, but I can only find the suspended-type folders. If I can't find them within a week, I'm gonna surrender to suspended folders.
to enable add-Dorg.eclipse.wst.sse.ui.foldingenabledin VM args. this adds an "enable folding" preference to the Structured Text Editors preference page which users can then enable/disable.
Note this is all still experimental, unstable.