Code Monkey home page Code Monkey logo

scala-intern-bookmark's Introduction

Intern-Bookmark

準備

sbt

sbtのダウンロードページ などを参考にインストールしましょう。Macの場合は以下のようにすればOK。

$ brew install sbt

データベース

MySQLを使いますのでインストールします。

$ brew install mysql
$ ln -fs $(brew --prefix mysql)/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

データベースとテーブル定義を読み込ませます。

$ mysqladmin create internbookmark
$ mysqladmin create internbookmark_test
$ cd /path/to/Intern-Bookmark-scala
$ cat db/schema.sql | mysql -uroot internbookmark
$ cat db/schema.sql | mysql -uroot internbookmark_test

実行

$ sbt
> run list
> run add http://www.hatena.ne.jp 便利なページ
> run delete http://www.hatena.ne.jp

mainクラスが複数あるので、実行時にどれを起動するか選択する必要があります。

テスト

$ sbt
> test

モジュール

  • internbookmark
    • cli
      • BookmarkCLI CLIコマンドの実装
    • model データモデル
      • Bookmark
      • Entry URLと対応
      • User
    • repository データモデルをDBやファイルシステムなどに記録して操作するためのサービス
      • Bookmarks Bookmarkのリポジトリ
      • Entries Entryのリポジトリ
      • Users Userのリポジトリ
      • Identifier Idを作ってくれる
      • TitleExtractor urlに対応するWebサイトのタイトル情報を取得してくれるサービスのtrait
      • TitleExtractorDispatch Dispatchを使ったTitleExtractorの実装
    • service アプリケーションのコアロジック
      • Json データモデルのJson表現を管理
      • BookmarkCLIApp ブックマークの主たる機能を表現したアプリケーションクラス
      • Error アプリケーション層で使うエラー定数

scala-intern-bookmark's People

Contributors

hakobe avatar yashigani avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.