All entries for November 2006

November 24, 2006

Files project update

Follow-up to Spring and Hypersonic/Hibernate tests from Kieran's blog

It’s been a while since my last update on this project. Unfortuately we’ve not done as much as I would have liked. Both Sarah and I have had holiday and we’ve been busy on other projects.

We’re back in the swing of things now and we’re moving forward a lot quicker now that most of the underlying infrastructure is in place.

To give an idea of the size of the project already (as well as just numbers can tell you anything):

  • 75 classes and interfaces
  • 22 test classes with 50 tests
  • 15 hibernate mapping files
  • 5 database tables (we are mapping quite a few classes to a single table in quite a few places)
  • 14 jsps (not many as we’ve not got loads of interfaces to some of the underlying code yet)

So, what does this code do then?

We’ve recently added quotas and the ability to email a file to someone. This basically sends an email with a link in it to a unique download URL that lasts a week and lets the person who sent the file keep track of downloads of that file (they get notified by email when it downloads and can see the download count on an web interface within their account).

We’ve also got the permissions system in now so that you can give view/edit/admin permissions to a person or a group of people (as usual there is no interface for this yet…just the code).

Everything is still pretty ugly as we’ve not done any graphic design work, so I’m not going to post any screenshots!


November 13, 2006

Gizmo's first 36 hours

Follow-up to Yet another new member of the family…Zeno/Gizmo from Kieran's blog

We’ve had Gizmo now for almost 36 hours and he’s been absolutely fantastic.

Gizmo in his bed Gizmo in the garden
Maggie and Gizmo in the garden Me and Gizmo

Even though he did pee in the house a few times yesterday and first thing this morning, he is a lot better now and is getting the right idea now and has been good all day.

I spent the day at home and kept an eye on him and Maggie. As expected, Maggie is not yet his biggest fan and has growled at him quite a lot. However, they’ve not actually had a fight and don’t look like they will. I even managed to leave them both alone at home for an hour today and they were fine…I got a great double bouncy greeting when I got home :)

Gizmo is also really responsive to training already and is already being really obedient, he’ll be all trained up and into his routine in no time.

All in all Steph and I are really pleased with him and couldn’t have picked a nicer dog!


November 10, 2006

Trying to get hold of people

Writing about web page http://www.dilbert.com/


November 08, 2006

DropSend for sale

Writing about web page http://www.barenakedapp.com/dropsend/dropsend-monthly-profit

Carson systems are selling DropSend so that they can concentrate on their new Amigo project. What makes this interesting is that they are doing their usual openness during the sale and are posting what would usually be regarded as trade secrets on their blog:


How much profit does DropSend bring in each month?
  • Revenue: $9,041.81 per month (and growing by 8.6% per month)
  • Costs: $2,100 per month (Servers at 365main.com + maintenance)
  • Profit: $6,941.81 per month

Looks like a lot of people have this sending/storing large files problem.


November 05, 2006

Yet another new member of the family…Zeno/Gizmo

Follow-up to New member of the family from Kieran's blog

After having a dog for almost 2 years…it’s time for another one!

We’ve had Maggie for almost 2 years now (2 years in January) and we’ve occasionally been thinking it’d be nice to have another dog, but we’ve never been that serious about it.

After going on holiday to visit my parents and yet again seeing Gina and Tiro and what good mates they are and seeing how well Maggie had got on with Steph’s Dad’s dog whilst we were away, it made us think again about another dog. This time, it seems right so we went and had a look around the Dogs Trust the last two weeks and yesterday we found the one :)

He’s currently called Zeno and was rescued as a stray from Ireland. He’s a Black Lab cross of some kind (possibly Border Collie) and about a year old. He’s a really nice boy, very friendly and seems to get on really well with Maggie when we took her to meet him both yesterday and today. We’re going to change his name to Gizmo as Zeno is just a made up kennel name and he doesn’t respond to it at all. With a bit of luck we’ll pick him up next Sunday!

It’s going to be hard work having a second dog, but I think it’s going to be really good for us as well as really good company for Maggie.

Maggie
Maggie close up

Best friends, Gina and Tiro
South Africa 2006 32

Zeno/Gizmo
Zeno/Gizmo and Maggie Zeno/Gizmo Zeno/Gizmo, me and Maggie Zeno/Gizmo


November 01, 2006

Spring and Hypersonic/Hibernate tests

Follow-up to Files project dev server from Kieran's blog

Having been away on holiday for 2 weeks and having quite a bit of catching up to do with other stuff, we’ve not made huge leaps in the last few weeks. However, we’re building up steam again now and have finally sorted out after a few restarts the domain model we’re going to be going for around the key aspects of accounts, files, folders, etc…

Up until now for speed of prototyping, we’ve been working with Spring, but not yet involved a database as we can quite easily just talk directly to the file system for now. However, now is the time to start getting more complex and we need somewhere to store all the metadata of all kinds about the files and accounts.

As usual, we’ll try and incrementally do the Hibernate mappings and start to build the database scheme. To do this quickly we’ll be building against some tests and a hypersonic database to start with. Spring provides the handy “AbstractTransactionalDataSourceSpringContextTests” class which allow easy binding of Spring objects and also a simple way to plug in transactional capabilities to your tests.

By coupling these test with the Hypersonic database which can be built and torn down in memory in just milliseconds, we can prototype the database very quickly.

Hibernate session-factory config

<session-factory>
        <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
         <property name="use_outer_join">true</property>
        <property name="hbm2ddl.auto">create-drop</property>

        <mapping resource="......hbm.xml"/>
   </session-factory>

Spring sessionfactory and datasource


<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="configLocation"><value>hypersonic-hibernate.cfg.xml</value></property>
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName">
          <value>org.hsqldb.jdbcDriver</value>
        </property>
        <property name="url">
          <value>jdbc:hsqldb:.</value>
         </property>
        <property name="username">
          <value>sa</value>
        </property>
        <property name="password">
          <value></value>
        </property>
    </bean>

So based on your mappings files, the database schema gets created in a new hypersonic database for each test giving you a working and clear schema to test against. Magic.


public class HypersonicTests extends AbstractTransactionalDataSourceSpringContextTests {

    protected String[] getConfigLocations() {
        return new String[] { "file:apps/webinterface/src/applicationContext.xml","file:apps/webinterface/test-src/hypersonic-db-context.xml"};
    }

}

public class DbConnectionTests extends HypersonicTests {

    private SessionFactory _sessionFactory;

    public final void testDbConnection() throws Exception {

        Session session = getSessionFactory().openSession();

        session.save(new AccountImpl(null, null, "Test", null));

        session.flush();

        List accounts = session.createCriteria(Account.class).list();

        assertEquals(1, accounts.size());

    }

    public SessionFactory getSessionFactory() {
        return _sessionFactory;
    }

    public void setSessionFactory(final SessionFactory sessionFactory) {
        _sessionFactory = sessionFactory;
    }

}

November 2006

Mo Tu We Th Fr Sa Su
Oct |  Today  | Dec
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30         

Tags

Search this blog

Most recent comments

  • One thing that was glossed over is that if you use Spring, there is a filter you can put in your XML… by Mathew Mannion on this entry
  • You are my hero. by Mathew Mannion on this entry
  • And may all your chickens come home to roost – in a nice fluffy organic, non–supermarket farmed kind… by Julie Moreton on this entry
  • Good luck I hope that you enjoy the new job! by on this entry
  • Good luck Kieran. :) by on this entry

Galleries

Not signed in
Sign in

Powered by BlogBuilder
© MMXIX