クラス名編をつくりました あるメソッドを定義しようとするとき、そのメソッドを使う人達が名前からどんなことをするか理解できるようにするには、メソッドの内容に応じて適切な情報量の命名が求められます。 この記事では、メソッド名に用いることでどのような情報が提供できるかを見ていきたいと思います。 真偽値を返すメソッド 場所 単語 意味 例
この投稿は DroidKaigi で話そうと思ったけど採択されなかった RejectedKaigi な内容です。 プログラムは、書けば書くほど複雑になります。行数が増え、分岐や繰り返しが増え、メソッドが増え、クラスが増え、パッケージが増え、管理するものは日に日に増えていきます。これらのものを使う側からすると、使うものが増えるということは、それだけ覚えることが増えることになります。勿論、IDE やエディタプラグインによって、そのような労力が極力減らされることもありますが、覚えることが少ないに越したことはありません。 この記事では、IDE やエディタプラグインはひとまず脇に置き、チームでコミュニケーションを取りながらコードを書くという観点で、従来のプログラミングのプラクティスを基に、開発時のミスを少なくし、チームで素早くアプリを作り続けていく方法論を深めていこうと思います。 Agenda 型を
Web な人もアプリな人も、これから新しく Android アプリを作るなら抑えておきたいポイント3選Androidandroid開発 概要 Lollipop が発表されてから時間も立ち、Android Auto、Android Wear、Android TV と、多様性を見せ始めた Android ですが、今後とも多種多様なデバイス向けに様々なアプリを作っていく流れがあるなか、新しくアプリを作るなら抑えておきたい要所をまとめました。 TL;DR 抑えるところは 3 つ。 画面とライフサイクル 非同期処理 互換性 かなり端的にいうと、Activity や Service などのライフサイクルとうまく付き合いながら、コードの構成のレイヤー化を行い、非同期処理を簡潔に記述できる準備をしておくことと、非同期処理とあわせてマルチスレッドプログラミングの基本を抑えておくこと、互換性への準備を最初にし
GitHub や Google Group を眺めていると、実にたくさんのライブラリプロジェクトがあります。 UI に関連するものもあれば、設計を整理するのを助けてくれるものもあり、様々です。 特に、UI に関連するものは、実際に動かすとどうなるのかが気になるところ。しかし、必ずしも README にスクリーンショットがあるとは限らないのが現状です。また、スクリーンショットがあっても、操作感がわからなかったりすることもあります。 そんなあなたへ、いろいろなライブラリのサンプルを寄せ集め、実際に動く様子を手に持って触れるアプリがありますのでご紹介。 for Android: Libraries for Developers for iOS: Libraries for Developers 片っ端からライブラリを寄せ集め、デモも組み込まれているすぐれもの。ライブラリの Author やライセ
アプリを作っていてありがちなこと Android には、画面を構成するための Activity というコンポーネントがあり、概ね MVC フレームワークの Controller に相当する機能を持っています。 MVC といえば、肥大化する Controller というのがよくある問題として挙げられますが、Activity も例に漏れず、往々にして肥大化しがちです。 また、Model も、その責務を詰め込んでいくと肥大化しやすいレイヤと言えます。 この投稿では、Controller や Model の肥大化を極力防ぐためのレイヤわけを、Android アプリ向けに書いていきます。 Activity を綺麗に保つ Activity は、Controller として、様々な UI から受けるイベントを受けて、適切にハンドリングする役割を持っています。 OptionsMenu や ContextM
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く