미디어위키 개발자가 되는 방법
이 문서는 기본적인 스킬과 미디어위키 중심 기능, 스킨, 확장기능들을 알아가는 개발자들을 위해 작성되었으며, 만약 자신이 어떤 코드를 작성하고있는지 제대로 알지 못한다면, 중심 기능에 접근하는것은 권하지 않습니다.
The main path to get started with Wikimedia development is to contribute to Wikimedia projects that offer mentoring. An alternative without mentoring is to fix a good first bug.
이미 미디어위키 개발에 익숙하다면, 개발자 허브 를 방문하십시요.
미디어위키 공동체에 참여하는 다른 방법을 보려면 기여하는 방법 항목을 참고하십시오.
개요
미디어위키는 위키백과, 위키백과의 자매 프로젝트, 그리고 전 세계 수천 개의 위키 사이트를 지원하는 소프트웨어입니다.
미디어위키는 PHP로 작성되었으나, 모든 부분이 PHP로 작성된것은 아닙니다. 몇가지의 기능은 다른 언어로 작성되었습니다. 자바 스크립트 등을 사용하기도 합니다.
미디어위키는 주로 LAMP라는 플랫폼에서 작성되었고 대부분 PHP 프로그램을 이용합니다. 만약 LAMP 프로그램을 실행시킬 수 없을 경우, 비-LAMP 플랫폼으로 구동됩니다. 미디어위키는 MySQL과 MariaDB 데이터 베이스 서버를 기본적으로 사용합니다. 오라클, Postgre, SQLite, 마이크로소프트 SQL 등도 확장기능을 통해 DB로 사용할 수 있습니다.
Development happens in an open source style[1], is largely coordinated online, and supported by the Wikimedia Foundation, though volunteer community developers play a huge part as well.
- 다양한 메일링 목록과 IRC 채널들 에서 개발 논의가 이루어지고 있습니다. 메인 개발자 목록은 여기 있습니다. wikitech-l. 메인 개발자 IRC 채널은 #mediawiki와#wikimedia-dev 입니다.
- 소스 코드는 Git 리비전 관리 시스템을 이용하시는것을 추천합니다.
- Code review is performed on 게릿 .
Follow this tutorial to set up Git and Gerrit in order to submit patches.
- 버그 신고는 Phabricator에서 해주세요.
이 페이지는 또한 미디어위키 기여자가 되는데 도움을 줄것입니다. 이 문서는 도움말이 아닙니다; 이 문서는 그저 필요한 무언가를 조금 알려주는 문서입니다.
개발 환경 구축하기
많은 프로젝트들이 Git 과 Gerrit을 사용합니다. Special:MyLanguage/Gerrit/Tutorial 에서 계정을 만들기를 권합니다. Then you can move on to downloading our code, making changes, testing them, and submitting patches. There are two ways to set up your development environment: using a pre-configured virtual machine setup (Vagrant or Docker), or a manual configuration approach.
Virtual Machine with Vagrant
- Vagrant installation — These steps will install MediaWiki server with all the requirements inside a Linux virtual machine (can be used on Linux, Windows, or Mac hosts).
Docker development environment
- MediaWiki Docker – Run MediaWiki using Docker (can be used on Linux, Windows or macOS hosts).
설치 매뉴얼
- Installation requirements — 하드웨어 환경을 확인하세요, 그 다음 LAMP, MAMP 또는 WAMP 서버를 구축하세요. (Linux, Mac or Windows서버에서, Apache, MySQL/MariaDB and PHP가 필요합니다.)
- Git에서 다운로드 — 최신 버전 소스코드를 깃[2]에서 다운로드하세요.
- 매뉴얼:설치 가이드 — 설치 과정등을 살펴보고 계속하세요.
- Set up the various debug modes in your environment to display warning and errors early.
It's not necessary to download Wikipedia database dumps in order to develop MediaWiki features.
In fact, in many cases it's easier to use a near-empty database with a few specially-crafted test pages. 만약 당신이 이유가 있어 위키백과를 포크[3]를 하고싶으시면, 덤프 파일을 가져가세요..
Communication tips and guidelines
- Do your research first: When you decide to work on a task, you are expected to do some basic research yourself first: Look at the code, try to get some understanding what it is supposed to do, read related documentation, try to find the probable place(s) where you need to make code changes. For a general overview, please read the Basics to know.
- In a Phabricator task, see the project tags in the side bar to find out which code repository a task is about.
- Ask and discuss in the best place:
- In Phabricator tasks, discuss only specific questions about the topic of that very Phabricator task. General technical questions (e.g. how to set up a development environment or problems with Gerrit) are off-topic in Phabricator tasks.
- For general technical questions, ask the broader Wikimedia community and use generic channels like IRC chat or mailing lists. (If you take part in an outreach program, then you can also use Zulip's technical-support stream.)
- If you take part in an outreach program, then Zulip is for discussing questions about the outreach programs themselves.
- Ask good questions: "Can you give me more info?", "Please guide me", "Please tell me how to start" are not good comments to start with: The more specific your questions are, the more likely somebody can answer them quickly. If you have no idea at all how to fix the bug, maybe that bug is not (yet) for you – consider finding an easier one first.
- Provide context: When asking, explain what you want to achieve, and what you have tried and found out already, so others can help at the right level. Be specific – for example, copy and paste your commands and their output (if not too long) instead of paraphrasing in your own words. This avoids misunderstandings.
- Ask in public: Do not send private messages if your conversation topic is not secret. Private messages do not help others.
- Be patient when seeking input and comments, especially during weekends and holidays.
- On IRC, don't ask to ask, just ask: most questions can be answered by other community members too if you ask on an IRC channel. If nobody answers, please try again at a different time; don't just give up.
- Do not ask people immediately for code review in a separate message. People receive Gerrit and Phabricator notifications.
- Keep conversations readable: When you reply in Zulip, in Phabricator tasks, or on mailing lists, please avoid unneeded quoting of a complete previous comment. Provide sufficient context and keep threads readable.
- Follow the code of conduct for Wikimedia technical spaces.
- When you plan to work on a Phabricator task:
- No need to ask for permission: Usually there is no reason to ask if you can work on something or if somebody could assign a task to you. There is no authority who assigns tasks or who needs to be asked first.
- You do not need to announce your plans before you start working on a task but it would be welcome. At the latest when you are close to proposing a patch for a task, it is good to announce that you are working on it, so that others don't duplicate work: If nobody else is already assigned, set yourself as task assignee by using the Add Action… → Assign/Claim dropdown.
- Tasks with existing patches:
- If a task already has a recent patch in Gerrit, choose a different task to work on instead – avoid duplicating work.
- If an existing patch in Gerrit has not been merged and has not seen any changes for a long time, you could also improve that existing patch, based on the feedback in Gerrit and in the task.
- When your plans or interests change: If you don't work on a task anymore, please remove yourself as the assignee of the task, so others know that they can work on the task and don't expect you to still work on it.
By communicating clearly and early you get attention, feedback and help from community members.
부록
PHP
미디어위키는 대부분 PHP로 작성되었기 때문에, PHP를 아는것이 필요합니다.
- PHP 배우기
-
- PHP 튜토리얼 — 다른 수많은 언어로 이용할 수 있습니다. If you have no knowledge of PHP but know how to program in other object-oriented programming languages, PHP will be easy for you to learn.
- PHP Programming at Wikibooks.
- PHP topic at Wikiversity.
- PHP 리소스
-
- PHP 매뉴얼 — Available in many different languages.
- PHP coding conventions within the MediaWiki community.
- 알아야 할 것
-
- The script
maintenance/eval.php
in MediaWiki provides a basic PHP interpreter with MediaWiki objects and classes loaded. - Also, the script
maintenance/shell.php
in MediaWiki is a replacement ofmaintenance/eval.php
based on PsySH, see Manual:Shell.php.
- The script
데이터베이스
Many features require some amount of database manipulation, so you'll often need to be familiar with MySQL/MariaDB.
- MySQL/MariaDB 배우기
-
- MySQL 튜토리얼 — From the MySQL 5.0 reference manual.
- MySQL at Wikibooks.
- MySQL/MariaDB 리소스
-
- MySQL Reference Manuals — Available in many different languages.
- MariaDB Knowledge Base
- Database coding conventions within the MediaWiki community.
- Accessing the database
- Stuff to know
-
- 당신의 MySQL/MariaDB 코드를 시험해 보세요.
- MediaWiki currently uses MySQL and MariaDB as the primary database back-end. It also supports other DBMSes, such as PostgreSQL and SQLite. However, almost all developers use MySQL/MariaDB and don't test other DBs, which consequently break on a regular basis. You're therefore advised to use MySQL/MariaDB when testing patches, unless you're specifically trying to improve support for another DB. In the latter case, make sure you're careful not to break MySQL/MariaDB (or write queries that are horribly inefficient in it), since MySQL/MariaDB is what everybody else uses.
- 당신의 MySQL/MariaDB 코드를 시험해 보세요.
자바스크립트와 CSS
JavaScript and CSS have become omnipresent in front-end code.
You don't have to be familiar with JavaScript, jQuery and CSS to work on MediaWiki, but you might need to, depending on what you choose to work on.
- 자바스크립트와 CSS 배우기
-
- JavaScript and CSS at Wikibooks.
- jQuery 가동하기 — jQuery 튜토리얼
- Learning JavaScript — references and sources.
- 자바스크립트와 CSS 리소스
-
- JavaScript coding conventions within the MediaWiki community.
- CSS coding conventions within the MediaWiki community.
MediaWiki
The MediaWiki code base is large and some parts are ugly; don't be overwhelmed by it. When you're first starting off, aim to write features or fix bugs which only touch a small region of code.
- MediaWiki basics and must-reads
-
- MediaWiki architecture — A high-level overview of the main components of MediaWiki and how they work with each other.
- Security for developers — An overview of why and how to write secure code.
- 미디어위키 리소스
-
- Manual:Code — A list of important files and links to more detailed information.
- 메뉴얼:훅 — A list of hooks. If you're trying to find what part of the codebase does something, often a good place to start is by searching for the related hooks.
- Manual:Coding conventions — An overview of general coding conventions within the MediaWiki community.
- Code documentation (class reference) — Automatically generated documentation from the code and code comments.
- Manual:How to debug — 미디어위키 디버깅 가이드
- Manual:Eval.php — A tool to interact with MediaWiki objects live.
미디어위키 확장기능
If you choose to work on MediaWiki extensions code, the following links provide more information.
- MediaWiki extensions basics:
-
- Developing extensions — How to write an extension for MediaWiki.
- Extension writing tutorial
- MediaWiki extensions resources:
-
- Best practices for extensions
- A brief introduction to MediaWiki extension development — A video presentation about how to create a MediaWiki extension (slides).
- Making a MediaWiki extension — Covers how to develop an extension for MediaWiki, best practices, and how to engage the MediaWiki community. 2011년 2월, 미디어위키 개발자 허브로부터
- Help for extension developers on the Developer Hub
같이 보기
- Search for code across repositories
- 개발자 허브 – When you've thoroughly read the information in this article, it's time to move on to the information in the developer hub.
- MediaWiki Developers Guide – a collection of related pages
- Code of Conduct
- ↑ Developers are a mix of volunteers and paid staff (or contractors) for various organizations. For a full list of who works on the MediaWiki code, read the Developers article.
- ↑ Git
- ↑ 문서 가져가기