Japanese Tokenizer – Design

 

I have drafted a sequence diagram for the application. Although I have hesitated between Java and Python, I have settled with Python. Because of the RESTful API for frontend, I have to consider authentication and I hate spring’s security module. I don’t like spring’s magic to begin with ( e.g: @AutoWired, @EnableWebdSecurity ), I prefer to have everything wired up by hand. It has becomes much more complicated over the tutorial on spring security. For example:

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .antMatchers("/", "/home").permitAll()
                .anyRequest().authenticated()
                .and()
            .formLogin()
                .loginPage("/login")
                .permitAll()
                .and()
            .logout()
                .permitAll();
    }

I don’t like chained method calls and I do not appreciate that the guide didn’t explain how does this part works. What is and(), what is the logic behind these lines? What if I don’t want to use a form login? I have an API so I don’t need a form login. The code does not look like the kind of Java I know.

So I chose Python, although I have more experience with Java. ( I have coded with Python, but not with django, I expected it’s trivial because of the small application )

I have been a backend developer for various project and seldom code frontend stuff. But if I have to make an web application, I would have to take care of frontend + backend. Please excuse me if I make horrible mistake in web design.

Frontend: A static page with javascript ( ReactJS )

Backend: Python Django

Security for the RESTful API: Http Basic authentication over HTTPS

I only have time to code it in Saturday and Sunday because I couldn’t focus after a full day work. For development, I prefer to do it on a VPS like digitalOcean because I don’t want to mess with my pc, however, it is too expensive to spin a droplet just for a day’s coding and paying for the whole month. I am looking in to Amazon AWS but I couldn’t get the ssh working. I use to code on digitalOcean and it’s much easier to connect with ssh. Actually this blog is hosted on a VPS of digitalOcean.

Let’s continue next time.

Leave a Reply

Your email address will not be published. Required fields are marked *